Key idea: Simplify the expression inside the logarithm first and split the logarithm into simple parts. We take x>0, so that x2=x. After differentiating, rationalising one fraction makes the answer collapse to a single term.
Step 1 — Simplify the expression inside the logarithm.
For x>0 we can write 1+x21 as xx2+1, and then the two terms share the denominator x.
x1+1+x21=x1+xx2+1=x1+x2+1
Step 2 — Split the logarithm.
Both 1+x2+1 and x are positive, so the quotient law gives a difference of logarithms, and the minus sign in front of the logarithm changes both signs.
y=x2+1−log(1+x2+1)+logx
Step 3 — Differentiate term by term.
The derivative of x2+1 is x2+1x, and it appears again inside the chain rule for the middle term.
dxdy=x2+1x−1+x2+11⋅x2+1x+x1
Step 4 — Combine the first two terms.
We take out the common factor x2+1x and simplify the bracket over the denominator 1+x2+1.