# How do I find the derivative of y = arctan(x/a) + ln sqrt((x-a)/(x+a))?

Aug 25, 2015

${y}^{'} = \frac{2 a {x}^{2}}{\left({a}^{2} + {x}^{2}\right) \left(x - a\right) \left(x + a\right)}$

#### Explanation:

First, notice that you can simplify your starting function

$y = \arctan \left(\frac{x}{a}\right) + \ln \left({\left(\frac{x - a}{x + a}\right)}^{\frac{1}{2}}\right)$

$y = \arctan \left(\frac{x}{a}\right) + \frac{1}{2} \cdot \ln \left(\frac{x - a}{x + a}\right)$

You will use implicit differentiation to find the derivative of $\arctan \left(\frac{x}{a}\right)$ first.

If you have $f = \arctan \left(\frac{x}{a}\right)$, you can write

$\tan \left(f\right) = \frac{x}{a}$

${\sec}^{2} \left(f\right) \cdot \frac{\mathrm{df}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(\frac{x}{a}\right)$

${\sec}^{2} \left(f\right) \cdot \frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{a}$

This means that you have

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{a \cdot {\sec}^{2} \left(f\right)}$

Use the trigonometric identity

$\textcolor{b l u e}{{\sec}^{2} \left(x\right) = 1 + {\tan}^{2} \left(x\right)}$

to get

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{a \cdot \left(1 + {\tan}^{2} \left(f\right)\right)} = \frac{1}{a} \cdot \frac{1}{1 + {\left(\frac{x}{a}\right)}^{2}}$

$\frac{\mathrm{df}}{\mathrm{dx}} = \frac{1}{\textcolor{red}{\cancel{\textcolor{b l a c k}{a}}}} \cdot {a}^{\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}}} / \left({a}^{2} + {x}^{2}\right) = \frac{a}{{a}^{2} + {x}^{2}}$

Now use the chain rule for $\ln u$, with $u = \frac{x - a}{x + a}$ and the quotient rule to find

$\frac{d}{\mathrm{dx}} \left(\ln u\right) = \frac{d}{\mathrm{du}} \ln u \cdot \frac{d}{\mathrm{dx}} \left(u\right)$

$\frac{d}{\mathrm{dx}} \left(\ln u\right) = \frac{1}{u} \cdot \frac{d}{\mathrm{dx}} \left(\frac{x - a}{x + a}\right)$

$\frac{d}{\mathrm{dx}} \left(\ln u\right) = \frac{1}{u} \cdot \left(\frac{\left[\frac{d}{\mathrm{dx}} \left(x - a\right)\right] \cdot \left(x + a\right) - \left(x - a\right) \cdot \frac{d}{\mathrm{dx}} \left(x + a\right)}{x + a} ^ 2\right)$

$\frac{d}{\mathrm{dx}} \left(\ln u\right) = \frac{1}{u} \cdot \frac{1 \cdot \left(x + a\right) - \left(x - a\right) \cdot 1}{x + a} ^ 2$

$\frac{d}{\mathrm{dx}} \left(\ln \left(\frac{x - a}{x + a}\right)\right) = \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{\left(x + a\right)}}}}{x - a} \cdot \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{x}}} + a - \textcolor{red}{\cancel{\textcolor{b l a c k}{a}}} + a}{x + a} ^ \textcolor{red}{\cancel{\textcolor{b l a c k}{2}}}$

d/dx(ln((x-a)/(x+a)) = (2a)/((x-a)(x+a))

So, your target derivative will thus be

$\frac{d}{\mathrm{dx}} \left(y\right) = \frac{d}{\mathrm{dx}} \left(\arctan \left(\frac{x}{a}\right)\right) + \frac{1}{2} \cdot \frac{d}{\mathrm{dx}} \left(\ln \left(\frac{x - a}{x + a}\right)\right)$

${y}^{'} = \frac{a}{{a}^{2} + {x}^{2}} + \frac{1}{\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}}} \cdot \frac{\textcolor{red}{\cancel{\textcolor{b l a c k}{2}}} a}{\left(x - a\right) \left(x + a\right)}$

${y}^{'} = \frac{a \left(x - a\right) \left(x + a\right) + a \left({a}^{2} + {x}^{2}\right)}{\left({a}^{2} + {x}^{2}\right) \left(x - a\right) \left(x + a\right)}$

${y}^{'} = \frac{a {x}^{2} - \textcolor{red}{\cancel{\textcolor{b l a c k}{{a}^{3}}}} + a {x}^{2} + \textcolor{red}{\cancel{\textcolor{b l a c k}{{a}^{3}}}}}{\left({a}^{2} + {x}^{2}\right) \left(x - a\right) \left(x + a\right)}$

Finally, you have

${y}^{'} = \textcolor{g r e e n}{\frac{2 a {x}^{2}}{\left({a}^{2} + {x}^{2}\right) \left(x - a\right) \left(x + a\right)}}$