Derivative of $$$\tan{\left(\frac{x}{2} \right)}$$$

The calculator will find the derivative of $$$\tan{\left(\frac{x}{2} \right)}$$$, with steps shown.

Related calculators: Logarithmic Differentiation Calculator, Implicit Differentiation Calculator with Steps

Leave empty for autodetection.
Leave empty, if you don't need the derivative at a specific point.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Find $$$\frac{d}{dx} \left(\tan{\left(\frac{x}{2} \right)}\right)$$$.

Solution

The function $$$\tan{\left(\frac{x}{2} \right)}$$$ is the composition $$$f{\left(g{\left(x \right)} \right)}$$$ of two functions $$$f{\left(u \right)} = \tan{\left(u \right)}$$$ and $$$g{\left(x \right)} = \frac{x}{2}$$$.

Apply the chain rule $$$\frac{d}{dx} \left(f{\left(g{\left(x \right)} \right)}\right) = \frac{d}{du} \left(f{\left(u \right)}\right) \frac{d}{dx} \left(g{\left(x \right)}\right)$$$:

$${\color{red}\left(\frac{d}{dx} \left(\tan{\left(\frac{x}{2} \right)}\right)\right)} = {\color{red}\left(\frac{d}{du} \left(\tan{\left(u \right)}\right) \frac{d}{dx} \left(\frac{x}{2}\right)\right)}$$

The derivative of the tangent is $$$\frac{d}{du} \left(\tan{\left(u \right)}\right) = \sec^{2}{\left(u \right)}$$$:

$${\color{red}\left(\frac{d}{du} \left(\tan{\left(u \right)}\right)\right)} \frac{d}{dx} \left(\frac{x}{2}\right) = {\color{red}\left(\sec^{2}{\left(u \right)}\right)} \frac{d}{dx} \left(\frac{x}{2}\right)$$

Return to the old variable:

$$\sec^{2}{\left({\color{red}\left(u\right)} \right)} \frac{d}{dx} \left(\frac{x}{2}\right) = \sec^{2}{\left({\color{red}\left(\frac{x}{2}\right)} \right)} \frac{d}{dx} \left(\frac{x}{2}\right)$$

Apply the constant multiple rule $$$\frac{d}{dx} \left(c f{\left(x \right)}\right) = c \frac{d}{dx} \left(f{\left(x \right)}\right)$$$ with $$$c = \frac{1}{2}$$$ and $$$f{\left(x \right)} = x$$$:

$$\sec^{2}{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{d}{dx} \left(\frac{x}{2}\right)\right)} = \sec^{2}{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{\frac{d}{dx} \left(x\right)}{2}\right)}$$

Apply the power rule $$$\frac{d}{dx} \left(x^{n}\right) = n x^{n - 1}$$$ with $$$n = 1$$$, in other words, $$$\frac{d}{dx} \left(x\right) = 1$$$:

$$\frac{\sec^{2}{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{d}{dx} \left(x\right)\right)}}{2} = \frac{\sec^{2}{\left(\frac{x}{2} \right)} {\color{red}\left(1\right)}}{2}$$

Simplify:

$$\frac{\sec^{2}{\left(\frac{x}{2} \right)}}{2} = \frac{1}{\cos{\left(x \right)} + 1}$$

Thus, $$$\frac{d}{dx} \left(\tan{\left(\frac{x}{2} \right)}\right) = \frac{1}{\cos{\left(x \right)} + 1}$$$.

Answer

$$$\frac{d}{dx} \left(\tan{\left(\frac{x}{2} \right)}\right) = \frac{1}{\cos{\left(x \right)} + 1}$$$A