So I was doing some exercises and I noticed that for one example which was of the form $$\ln( \frac{a}{b} )$$ (with a and b being some term with x), that I was getting a different result for taking the derivation when using the logarithmic rule $$\ln( \frac{a}{b} ) = \ln(a) - \ln(b)$$ before deriving versus applying chain and quotient rules right away.
I tried this with some other examples of that form too and I always ended up getting different results, but I have no idea what would cause this to happen.
One of the examples I tried would be $$\ln( \frac{4+x}{4-x} )$$ which yields $$\frac{-8+8x}{(4+x)^3}$$ when applying chain and quotient rules right away and $$\frac{8}{16-x^2}$$ when using $$\ln( \frac{a}{b} ) = \ln(a) - \ln(b)$$ before deriving.
Would really appreciate some help, thanks in advance.
If you differentiate $\log\left(\frac{4+x}{4-x}\right)$ directly, what you get is$$\frac{\left(\frac{4+x}{4-x}\right)'}{\frac{4+x}{4-x}}=\frac{\frac{4-x+4-x}{(4-x)^2}}{\frac{4+x}{4-x}}=\frac8{(4-x)(4+x)}.\tag1$$And if you differentiate $\log(4+x)-\log(4-x)$, what you get is$$\frac1{4+x}+\frac1{4-x},$$which is equal to $(1)$.