How do you differentiate f(x)=-5 xe^(x/cos x) using the chain rule?

2 Answers
Jun 21, 2016

-5 e^{x/cos x} (1 + x (cos x + x sin x)/cos^2 x )

Explanation:

you'll need the product rule first of course so we can simplify by letting p = e^{x/cos x}

then first we work the product rule so (-5x p)' = -5 p -5x p' Eqn A

and now for p', we know from the chain rule that (e^{f(x)})' = f'(x) e^{f(x)} where, here, f(x) = x/ cosx

and so
so f'(x) = (x / cos x)' = (cos x + x sin x)/cos^2 x from the quotient rule

which means that p' = (e^{x/cos x})' = e^{x/cos x} (cos x + x sin x)/cos^2 x

going back to Eqn A, and plugging this all back in, we then have

(-5x e^{x/cos x})' = -5 e^{x/cos x} -5x e^{x/cos x} (cos x + x sin x)/cos^2 x

= -5 e^{x/cos x} (1 + x (cos x + x sin x)/cos^2 x )

that could be tidied up maybe in some other way...

personally, i think it is helpful to look at logarithmic differentiation here

so we can instead say that ln p = x/ cosx

so 1/p p' = (x / cos x)' = (cos x + x sin x)/cos^2 x

so p' = p(x / cos x)' = e^{x/cos x} (cos x + x sin x)/cos^2 x again using the quotient rule for the second bit of this.

another way of looking at it

Jun 21, 2016

frac{d}{dx}(-5xe^{frac{x}{cos (x)}})=-5(e^{frac{x}{cos (x)}}+frac{e^{frac{x}{cos (x)}}x(xsin (x)+cos (x))}{cos ^2(x)})

Explanation:

frac{d}{dx}(-5xe^{frac{x}{cos (x)}})

Taking the constant out, (acdot f)^'=a\cdot f^'

=-5frac{d}{dx}(xe^{frac{x}{cos (x)}})

Applying the product rule, (f\cdot g)^'=f^'\cdot g+f\cdot g^'
f=x,g=e^{frac{x}{cos (x)}}

=-5(frac{d}{dx}(x)e^{frac{x}{cos(x)}}+frac{d}{dx}(e^{frac{x}{cos(x)}})x)

We know,
frac{d}{dx}(x)=1
frac{d}{dx}(e^{frac{x}{cos (x)}})=frac{e^{\frac{x}{cos (x)}}(xsin (x)+cos (x))}{cos ^2(x)}

[i.e applying chain rule; frac{df(u)}{dx}=frac{df}{du}cdot frac{du}{dx}

Let frac{x}{cos (x)}=u
=frac{d}{du}(e^u)frac{d}{dx}(frac{x}{cos (x)})
and, frac{d}{du}(e^u)=e^u
also, frac{d}{dx}(frac{x}{cos (x)})=frac{cos (x)+xsin (x)}{cos ^2(x)}

=e^ufrac{cos (x)+xsin(x)}{cos ^2(x)}

substituting back, u=frac{x}{cos (x)}
=e^{frac{x}{cos (x)}}frac{cos(x)+xsin(x)}{cos ^2(x)}

simplifying it,
=frac{e^{frac{x}{cos (x)}}(xsin (x)+cos(x))}{cos ^2(x)} ]

so, =-5(1e^{frac{x}{cos (x)}}+frac{e^{frac{x}{cos(x)}}(xsin(x)+cos(x))}{cos ^2(x)}x)

simplifying it,
5(e^{frac{x}{cos (x)}}+frac{e^{frac{x}{cos (x)}}x(xsin (x)+cos (x))}{cos ^2(x)})