# Math Help - Chain rule

1. ## Chain rule

Hey,
I am currently having difficulties applying the chain rule to problems from what i can gather the chain rule is the derivative of the inside multiplied by the derivative of the outside

I tried working through a problem but screwed up somewhere,
The problem
find the derivative
$
k(x)=x^{2}sec(\frac{1}{x})
$

what I did
$k(x)=x^{2}sec(\frac{1}{x})$
= $2x(secxtanx)\( \frac{x(0)-1(x)}{x})$
= $2x(secxtanx)(\frac{-1x}{x^{2}})$
= $2x(secxtanx)(\frac{-1}{x})$
= $\frac{-2x(secx^{3})}{x}$
Am i on the right path

2. $f(x)=x^2sec(\frac{1}{x})$

$f'(x)=2xsec(\frac{1}{x})+x^2(sec(\frac{1}{x}))'$

$(sec(\frac{1}{x})'=-{\frac{tan(frac{1}{x})sec(\frac{1}{x})}{x^2}}$

$f'(x)=2xsec(\frac{1}{x})+x^2{\frac{tan(\frac{1}{x} )sec(\frac{1}{x})}{x^2}}=2xsec(\frac{1}{x})-{{tan(\frac{1}{x})sec(\frac{1}{x})}$