integral calculus logarithmic functions

Pano po naging sagot sa problem na integral of dx all over x(1+x^2) e 1/2 ln x^2 over 1+x^2 +c

Binasa ko uli ang post mo at naintindihan ko na. You ask why
$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \dfrac{1}{2} \, \ln \left( \dfrac{x^2}{1 + x^2} \right) + C$

am I right? If so, here is the detail:
 

$\dfrac{1}{x(1 + x^2)} = \dfrac{A}{x} + \dfrac{Bx + C}{1 + x^2}$

$1 = A(1 + x^2) + Bx^2 + Cx$
 

When x = 0, A = 1
Equate x2: 0 = A + B, B = -1
Equate x: C = 0
 

Thus,
$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \int \left( \dfrac{1}{x} - \dfrac{x}{1 + x^2} \right) \, dx$

$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \int \dfrac{dd}{x} - \dfrac{1}{2} \int \dfrac{2x \, dx}{1 + x^2}$

$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \ln x - \dfrac{1}{2} \ln (1 + x^2) + C$

$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \dfrac{1}{2} \left[ 2\ln x - \ln (1 + x^2) \right] + C$

$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \dfrac{1}{2} \left[ \ln x^2 - \ln (1 + x^2) \right] + C$

$\displaystyle \int \dfrac{dx}{x(1 + x^2)} = \dfrac{1}{2} \, \ln \left( \dfrac{x^2}{1 + x^2} \right) + C$

as we expect it to be.