# What are the first and second derivatives of  g(x) = lntanx?

##### 1 Answer
Dec 14, 2015

$g ' \left(x\right) = {\sec}^{2} \frac{x}{\tan} x$

$g ' ' \left(x\right) = \frac{{\sec}^{2} x \left(2 {\tan}^{2} x - {\sec}^{2} x\right)}{\tan} ^ 2 x$

#### Explanation:

Know that $\frac{d}{\mathrm{dx}} \left[\ln \left(u\right)\right] = \frac{u '}{u}$.

Therefore,

$g ' \left(x\right) = \frac{\frac{d}{\mathrm{dx}} \left[\tan x\right]}{\tan} x = {\sec}^{2} \frac{x}{\tan} x$

$g ' ' \left(x\right) = \frac{\tan x \frac{d}{\mathrm{dx}} \left[{\sec}^{2} x\right] - {\sec}^{2} x \frac{d}{\mathrm{dx}} \left[\tan x\right]}{\tan} ^ 2 x$

Find each derivative separately.

Chain rule:
$\frac{d}{\mathrm{dx}} \left[{\sec}^{2} x\right] = 2 \sec x \frac{d}{\mathrm{dx}} \left[\sec x\right] = 2 \sec x \left(\sec x \tan x\right) = 2 {\sec}^{2} x \tan x$

$\frac{d}{\mathrm{dx}} \left[\tan x\right] = {\sec}^{2} x$

Plug these back in.

$g ' ' \left(x\right) = \frac{2 {\sec}^{2} x {\tan}^{2} x - {\sec}^{4} x}{\tan} ^ 2 x$

$g ' ' \left(x\right) = \frac{{\sec}^{2} x \left(2 {\tan}^{2} x - {\sec}^{2} x\right)}{\tan} ^ 2 x$