How do you differentiate y=x^2tan(1/x)?

Nov 19, 2016

Use a combination of the product rule and the chain rule to get
$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \tan \left(\frac{1}{x}\right) - {\sec}^{2} \left(\frac{1}{x}\right)$.

Explanation:

Let $f$ and $g$ be functions of $x$.
The product rule states that if $y = f \cdot g$ then $y ' = f ' \cdot g + f \cdot g '$.
The chain rule states that if $y = f \left(g\right)$ then $y ' = f ' \left(g\right) \cdot g '$.

In this question, say $f \left(x\right) = {x}^{2}$, $g \left(x\right) = \tan \left(x\right)$, and $h \left(x\right) = \frac{1}{x}$.

Then $y = f \left(x\right) \cdot g \left[h \left(x\right)\right]$

And so
$y ' = \left[f \left(x\right)\right] ' g \left[h \left(x\right)\right] + f \left(x\right) \left\{g \left[h \left(x\right)\right]\right\} '$
$y ' = f ' \left(x\right) \cdot g \left[h \left(x\right)\right] + f \left(x\right) \cdot g ' \left[h \left(x\right)\right] \cdot h ' \left(x\right)$

This means if $y = {x}^{2} \tan \left(\frac{1}{x}\right)$
then

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left({x}^{2}\right) \cdot \tan \left(\frac{1}{x}\right) + {x}^{2} \cdot \frac{d}{\mathrm{dx}} \tan \left(\frac{1}{x}\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \tan \left(\frac{1}{x}\right) + {x}^{2} \cdot {\sec}^{2} \left(\frac{1}{x}\right) \cdot \frac{d}{\mathrm{dx}} \left(\frac{1}{x}\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \tan \left(\frac{1}{x}\right) + \cancel{{x}^{2}} {\sec}^{2} \left(\frac{1}{x}\right) \cdot \frac{- 1}{\cancel{{x}^{2}}}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 x \tan \left(\frac{1}{x}\right) - {\sec}^{2} \left(\frac{1}{x}\right)$

That's likely as far as you'll need to go.