Differentiation Part2

From StpmWiki

Jump to: navigation, search

Contents

Chain Rule

\frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}

  • Notice that \frac{{\color{Blue}dy}}{{\color{Blue}dx}}=\frac{{\color{Blue}dy}}{{\color{Red}du}}\times\frac{{\color{Red}{du}}}{{\color{Blue}dx}}. u\, can also be replaced by any other variables.

Composite Functions

Let say y=fg\left(x\right), where f\, and g\, are basic functions which we know how to differentiate. Since the f\, is "applied" to g\left(x\right), it might be easier to us to rewrite it as f\left(u\right), where u=g\left(x\right).

So how would we differentiate it?

  • \frac{dy}{dx} =\frac{d\left[fg\left(x\right)\right]}{dx} =\frac{d\left[f\left(u\right)\right]}{dx}

Now, we can differentiate \frac{d\left[f\left({\color{Blue}x}\right)\right]}{d{\color{Blue}x}} directly, but not \frac{d\left[f\left({\color{Red}u}\right)\right]}{d{\color{Blue}x}}.

  • For example \frac{d\left({{\color{Blue}x}}^{2}\right)}{d{\color{Blue}x}}=2{\color{Blue}x} but \frac{d\left({{\color{Red}u}}^{2}\right)}{d{\color{Blue}x}} can't be done directly. However, if we have \frac{d\left({{\color{Red}u}}^{2}\right)}{d{\color{Red}u}}, it will be =2{\color{Red}u}
  • In other words, if we have f\left({\color{Red}\heartsuit} \right), we can only differentiate it (directly) with respect to {\color{Red}\heartsuit}

So let's look back at \frac{d\left[f\left(u\right)\right]}{dx}

  • We know that we can differentiate f\left(u\right) with respect with u\,. In other words, we can find \frac{d\left[f\left(u\right)\right]}{du}
  • But surely we CAN'T just change \frac{d\left[f\left(u\right)\right]}{dx} to \frac{d\left[f\left(u\right)\right]}{du} by writing \frac{d\left[f\left(u\right)\right]}{{\color{Blue}dx}}=\frac{d\left[f\left(u\right)\right]}{{\color{Red}du}}
  • We need to introduce the {\color{Blue}dx} as well as move the {\color{Red}du} to somewhere else, thus we use the chain rule.
  • Thus, \frac{d\left[f\left(u\right)\right]}{{\color{Blue}dx}}=\frac{d\left[f\left(u\right)\right]}{{\color{Red}du}}\times \frac{{\color{Red}du}}{{\color{Blue}dx}}

Once again, \frac{d\left[fg\left(x\right)\right]}{dx} =\frac{d\left[f\left({\color{Red}u}\right)\right]}{dx} =\frac{d\left[f\left({\color{Red}u}\right)\right]}{{\color{Red}du}}\times\frac{{\color{Red}du}}{dx}

[f(x)]^n

M) \frac{d}{dx}{\left[f\left(x\right)\right]}^{n} =n{\left[f\left(x\right)\right]}^{n-1}\cdot f'\left(x\right)

  • Remember : Derivative of something power n\,, "bring" down the index, copy back exactly that something, minus one to the index, then multiply with the derivative of that something.

Prove

  • Analyze : When we see {\left[f\left(x\right)\right]}^{n}, we see something power n\,. Thus we let that something to be u\,. We already know that \frac{d}{d{\color{Red}\heartsuit}}{{\color{Red}\heartsuit}}^{n}=n{{\color{Red}\heartsuit}}^{n-1}\,
    • Let f\left(x\right)=u
    • \frac{d}{dx}{\left[f\left(x\right)\right]}^{n}=\frac{d}{dx}\left({u}^{n}\right)
      • =\frac{d}{du}\left({u}^{n}\right)\times \frac{du}{dx}
      • =n{u}^{n-1}\left(\frac{du}{dx}\right)
      • =n{\left[f\left(x\right)\right]}^{n-1}\cdot f'\left(x\right)

Examples

Find f'\left(x\right) for the following

  • f\left(x\right)={\left(3x-7\right)}^{6} f'\left(x\right)=18{\left(3x-7\right)}^{5}
    • Analyze : Something power 6 . Note: that something is \left(3x-7\right) and NOT {\left(3x-7\right)}^{6}
      • First, we write f'\left(x\right)
      • Bring down the index f'\left(x\right)={\color{Red}6}
      • Copy exactly that something f'\left(x\right)=6{\color{Red}\left(3x-7\right)}
      • Minus one to the index f'\left(x\right)=6{\left(3x-7\right)}^{{\color{Red}5}}
      • Multiply with derivative of \left(3x-7\right), which is 3\,, f'\left(x\right)=6{\left(3x-7\right)}^{5}{\color{Red}\cdot3}
      • Simplify =18{\left(3x-7\right)}^{5}
      • Eh? Still got step? CHECK ;). It's VERY easy to miss a step or two, looking over the whole thing again to make sure that is not the case
  • f\left(x\right)=\frac{3}{4x+1} f'\left(x\right)=-\frac{12}{{\left(4x+1\right)}^{2}}
    • Analyze : Constant over something, which means it is something power -1\,
      • f\left(x\right)=\frac{3}{4x+1} =3{\left(4x+1\right)}^{-1}
      • f'\left(x\right)={\color{Red}-3}
      • f'\left(x\right)=-3{\color{Red}\left(4x+1\right)}
      • f'\left(x\right)=-3{\left(4x+1\right)}^{{\color{Red}-2}}
      • f'\left(x\right)=-3{\left(4x+1\right)}^{-2}{\color{Red}\cdot4}
      • =-\frac{12}{{\left(4x+1\right)}^{2}}
      • Alternatively
        • f'\left(x\right)=\frac{{\color{Red}-3}}{}
        • f'\left(x\right)=\frac{-3}{{\color{Red}\left(4x+1\right)}}
        • f'\left(x\right)=\frac{-3}{{\left(4x+1\right)}^{{\color{Red}2}}}
        • f'\left(x\right)=\frac{-3}{{\left(4x+1\right)}^{2}}{\color{Red}\cdot4}
        • =-\frac{12}{{\left(4x+1\right)}^{2}}

  • f\left(x\right)={\left({x}^{2}+\frac{4}{x}+1 \right)}^{3}
    • f'\left(x\right)=3{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\left(2x-\frac{4}{{x}^{2}} \right)
    • Note: There are some common mistakes when the something gets more complicated like above
      • Differentiating that something too early, such as f'\left(x\right)=3{\left(2x-\frac{4}{{x}^{2}} \right)}^{2}. In this case, the student had bring down the index, minus one to the index, and differentiated that something, when he should have bring down the index, copy that something, minus one to the index, and then multiply derivative that something.
      • Not writing the derivative in a single step. Remember that f\left(x\right) and f'\left(x\right) are two very different things, and there can be only one step that we change one to the other. We can't differentiate halfway, and leave the rest at the next step.
        • Thus \begin{align}
f\left(x\right) &={\left({x}^{2}+\frac{4}{x}+1 \right)}^{3}\\
f'\left(x\right) &=2{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\\
&=2{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\left(2x-\frac{4}{{x}^{2}} \right)\\
\end{align} is WRONG.
        • This problem is common if we had tried to write out the working of the derivative of that something in the main working
          • \begin{align}
f\left(x\right) &={\left({x}^{2}+\frac{4}{x}+1 \right)}^{3}\\
f'\left(x\right) &=2{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\left({x}^{2}+4{x}^{-1}\right)\\
&=2{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\left(2x-4{x}^{-2}\right)\\
&=2{\left({x}^{2}+\frac{4}{x}+1 \right)}^{2}\left(2x-\frac{4}{{x}^{2}}\right)\\
\end{align} is also WRONG.
        • The best solution would be if we could differentiate that something directly without needing to show the steps (but DO check it), but another option would be to do that derivative as a side working at the side. Something like
          • \begin{array}{ll}
f'\left(x\right)= 3{\left({x}^{2}+\cfrac{4}{x}+1 \right)}^{2}\left(2x-\cfrac{4}{{x}^{2}} \right) \qquad \qquad
& \mbox{Let }y={x}^{2}+\cfrac{4}{x}+1={x}^{2}+4{x}^{-1}+1\\
& \cfrac{dy}{dx}=2x-4{x}^{-2}=2x-\cfrac{4}{{x}^{2}}
\end{array}

  • f\left(x\right)=\sqrt{3x+1}
    • Since we know that \frac{d}{dx}\sqrt x =\frac{1}{2\sqrt{x}}, we can actually do it directly
      • f'\left(x\right)=\frac{3}{2\sqrt{3x+1}}
  • f\left(x\right)=\frac{1}\sqrt{1-{x}^{2}}
      • \begin{align}
f\left(x\right) &=\frac{1}\sqrt{1-{x}^{2}}\\
&={\left(1-{x}^{2}\right)}^{-\frac{1}{2}}\\
f'\left(x\right) &=-\frac{1}{2}{\left(1-{x}^{2}\right)}^{-\frac{3}{2}}\left(-2x \right)\\
&=\frac{x}{{\left(1-{x}^{2}\right)}^{\frac{3}{2}}}
\end{align}
  • f\left(x\right)={\left(x+1\right)}^{3}{\left(2x-1\right)}^{4} f'\left(x\right)={\left(x+1\right)}^{2}{\left(2x-1\right)}^{3}\left(14x+5 \right)
    • Analyze : Look at the function. What is the main thing you see? Something times something (and NOT something power n)
      • Copy first thing f'\left(x\right)={\color{Red}{\left(x+1\right)}^{3}}
      • Differentiate second thing f'\left(x\right)={\left(x+1\right)}^{3}{\color{Red}\cdot 4{\left(2x-1\right)}^{3}\left(2 \right)}
        • Note: We can also do the derivative as side working and then copy the result
        • The use of \cdot to represent times is just a way to avoid too many brackets but also gives a bit of structure to to the expression since here we use it to separate the first thing and the derivative of the second thing and so on.
      • Plus copy second thing f'\left(x\right)={\left(x+1\right)}^{3}\cdot 4{\left(2x-1\right)}^{3}\left(2 \right)+{\color{Red}{\left(2x-1\right)}^{4}}
      • Differentiate the first thing f'\left(x\right)={\left(x+1\right)}^{3}\cdot 4{\left(2x-1\right)}^{3}\left(2 \right)+{\left(2x-1\right)}^{4}{\color{Red}\cdot 3{\left(x+1\right)}^{2}\left(1 \right)}
        • Note : The \left(1 \right) is of course, not needed, but we can write it down to complete the structure of the derivative which makes is easier for us to check we haven't missed out any parts
      • Simplify by factorizing. It's best that we concentrate on thing at one time.
        • Let's look at the numbers first. f'\left(x\right)={\left(x+1\right)}^{3}\cdot {\color{Blue}4}{\left(2x-1\right)}^{3}\left({\color{Blue}2} \right)+{\left(2x-1\right)}^{4}\cdot {\color{Blue}3}{\left(x+1\right)}^{2}\left({\color{Blue}1} \right) Nothing to factorize.
        • Now let's look at \left(x+1\right) f'\left(x\right)={\color{Blue}{\left(x+1\right)}^{3}}\cdot 4{\left(2x-1\right)}^{3}\left(2 \right)+{\left(2x-1\right)}^{4}\cdot 3{\color{Blue}{\left(x+1\right)}^{2}}\left(1\right) Factorize power 2 out.
        • Now let's look at \left(2x-1\right) f'\left(x\right)={\left(x+1\right)}^{3}\cdot 4{\color{Blue}{\left(2x-1\right)}^{3}}\left(2 \right)+{\color{Blue}{\left(2x-1\right)}^{4}}\cdot 3{\left(x+1\right)}^{2}\left(1 \right) Factorize power 3 out.
        • Notice that the degrees always differ by one only, cause we minus one to the degree when differentiating the something power n. If you get, say, power 5 and power 1, most probably it means you didn't do the derivative of the something power n correctly.
        • So all together, it becomes f'\left(x\right)={\left(x+1\right)}^{2}{\left(2x-1\right)}^{3}\left[\dots\right]
        • Carefully, we list down what is left from the two terms after factorizing those things out
          • f'\left(x\right)={\left(x+1\right)}^{2}{\left(2x-1\right)}^{3}\left[{\color{Blue}8\left(x+1\right)}\dots\right]
          • f'\left(x\right)={\left(x+1\right)}^{2}{\left(2x-1\right)}^{3}\left[8\left(x+1\right)+{\color{Blue}3\left(2x-1\right)}\right]
        • ={\left(x+1\right)}^{2}{\left(2x-1\right)}^{3}\left(14x+5\right)

  • f\left(x\right)=\frac{{\left(4x-1 \right)}^{3}}{{\left(x+2\right)}^{2}} f'\left(x\right)=\frac{2{\left(4x-1 \right)}^{2}\left(2x+13\right)}{{\left(x+2 \right)}^{3}}
    • Analyze : Something over something
      • Differentiating f'\left(x\right)=\frac{{\left(x+2 \right)}^{2}\cdot3{\left(4x-1 \right)}^{2}\left(4\right)-{\left(4x-1\right)}^{3}\cdot2\left(x+2\right)\left(1\right)}{{\left(x+2 \right)}^{4}}
      • The next step will be to Simplify? NO. You should check that you have done the differentiation correctly first.
      • Factorizing f'\left(x\right)=\frac{{\color{Red}2\left(x+2 \right){\left(4x-1 \right)}^{2}}\qquad\qquad\qquad}{{\left(x+2 \right)}^{4}}
      • f'\left(x\right)=\frac{2\left(x+2 \right){\left(4x-1 \right)}^{2}{\color{Red}\left[6\left(x+2\right)-\left(4x-1\right)\right]}}{{\left(x+2 \right)}^{4}}
      • Simplifying and cutting the top and bottom \left(x+2\right), =\frac{2{\left(4x-1 \right)}^{2}\left(2x+13\right)}{{\left(x+2 \right)}^{3}}

Exercise 3

Find f'\left(x\right) for the following

a) f\left(x\right)={\left(1-5x\right)}^{7}-{\left({x}^{2}-1\right)}^{-3}

  • f'\left(x\right)=-35{\left(1-5x\right)}^{6}+6x{\left({x}^{2}-1\right)}^{-4}
    • \begin{align}f'\left(x\right)&=7{\left(1-5x\right)}^{6}\left(-5\right)-3{\left({x}^{2}-1\right)}^{-4}\left(2x\right)\\
&=-35{\left(1-5x\right)}^{6}+6x{\left({x}^{2}-1\right)}^{-4} \end{align}

b) f\left(x\right)=\frac{5}{7x-1}+\frac{3}{{\left(x+1\right)}^{5}}

  • f'\left(x\right)=-\frac{35}{{\left(7x-1\right)}^{2}}-\frac{15}{{\left(x+1\right)}^{6}}
    • \begin{align}
f\left(x\right) & =\frac{5}{7x-1}+\frac{3}{{\left(x+1\right)}^{5}}\\
& =5{\left(7x-1\right)}^{-1}+3{\left(x+1\right)}^{-5}  \\
f'\left(x\right)&=-5{\left(7x-1\right)}^{-2}\left(7\right)-15{\left(x+1\right)}^{-6} \\
& =-\frac{35}{{\left(7x-1\right)}^{2}}-\frac{15}{{\left(x+1\right)}^{6}}
\end{align}

c) f\left(x\right)={\left({x}^{2}-2\sqrt{x}+3 \right)}^{4}

  • f'\left(x\right)=4{\left({x}^{2}-2\sqrt{x}+3 \right)}^{3}\left(2x-\frac{1}{\sqrt{x}}\right)
    • \begin{align}
f'\left(x\right)& =4{\left({x}^{2}-2\sqrt{x}+3 \right)}^{3}\left(2x-\frac{2}{2\sqrt{x}}\right)\\
& =4{\left({x}^{2}-2\sqrt{x}+3 \right)}^{3}\left(2x-\frac{1}{\sqrt{x}}\right)\\
\end{align}

d) f\left(x\right)=\sqrt{{x}^{2}-4}+\frac{2}{\sqrt{x+3}}

  • f'\left(x\right)=\frac{x}{\sqrt{{x}^{2}-4}}-\frac{1}{{\left(x+3 \right)}^{\frac{3}{2}}}
    • \begin{align}
f\left(x\right)&=\sqrt{{x}^{2}-4}+\frac{2}{\sqrt{x+3}}\\
&=\sqrt{{x}^{2}-4}+2{\left(x+3\right)}^{-\frac{1}{2}}\\
f'\left(x\right)&=\frac{2x}{2\sqrt{{x}^{2}-4}}-{\left(x+3 \right)}^{-\frac{3}{2}}\\
&=\frac{x}{\sqrt{{x}^{2}-4}}-\frac{1}{{\left(x+3 \right)}^{\frac{3}{2}}}
\end{align}

e) f\left(x\right)=\frac{1}{{x}^{2}+2x+8}

  • f'\left(x\right)=-\frac{2\left(x+1\right)}{{\left({x}^{2}+2x+8\right)}^{2}}
    • \begin{align}
f'\left(x\right)& =-\frac{2x+2}{{\left({x}^{2}+2x+8\right)}^{2}}\\
& =-\frac{2\left(x+1\right)}{{\left({x}^{2}+2x+8\right)}^{2}}\\
\end{align}

f) f\left(x\right)={\left(2x+5\right)}^{6}{\left(3x+2\right)}^{3}

  • f'\left(x\right)=3{\left(2x+5\right)}^{5}{\left(3x+2\right)}^{2}\left(18x+23\right)
    • \begin{align}
f\left(x\right)& ={\left(2x+5\right)}^{6}{\left(3x+2\right)}^{3}\\
f'\left(x\right)& ={\left(2x+5\right)}^{6}\cdot 3{\left(3x+2\right)}^{2}\left(3\right)+{\left(3x+2\right)}^{3}\cdot6{\left(2x+5\right)}^{5}\left(2\right)\\
&=3{\left(2x+5\right)}^{5}{\left(3x+2\right)}^{2}\left[3\left(2x+5\right)+4\left(3x+2\right)\right]\\
&=3{\left(2x+5\right)}^{5}{\left(3x+2\right)}^{2}\left(18x+23\right)
\end{align}

g) f\left(x\right)={\left(x+1\right)}^{4}{\left({x}^{2}-7\right)}^{2}

  • f'\left(x\right)=4{\left(x+1\right)}^{3}\left({x}^{2}-7\right)\left(2{x}^{2}+x-7\right)
    • \begin{align}
f\left(x\right)&={\left(x+1\right)}^{4}{\left({x}^{2}-7\right)}^{2}\\
f'\left(x\right)& ={\left(x+1\right)}^{4}\cdot2\left({x}^{2}-7\right)\left(2x\right)+{\left({x}^{2}-7\right)}^{2}\cdot4{\left(x+1\right)}^{3}\\
&=4{\left(x+1\right)}^{3}\left({x}^{2}-7\right)\left[x\left(x+1\right)+\left({x}^{2}-7\right)\right]\\
&=4{\left(x+1\right)}^{3}\left({x}^{2}-7\right)\left(2{x}^{2}+x-7\right)
\end{align}

h) f\left(x\right)=\frac{{\left(2x-5\right)}^{2}}{{\left(1-x\right)}^{3}}

  • f'\left(x\right)= 
\frac{\left(2x-5\right)\left(2x-11\right)}{{\left(1-x\right)}^{4}}
    • \begin{align}
f\left(x\right)&=\frac{{\left(2x-5\right)}^{2}}{{\left(1-x\right)}^{3}}\\
f'\left(x\right)& =\frac{{\left(1-x\right)}^{3}\cdot2\left(2x-5\right)\left(2\right)-{\left(2x-5\right)}^{2}\cdot3{\left(1-x\right)}^{2}\left(-1 \right)}{{\left(1-x\right)}^{6}}\\
& =\frac{{\left(1-x\right)}^{2}\left(2x-5\right)\left[4\left(1-x\right)+3\left(2x-5\right)\right]}{{\left(1-x\right)}^{6}}\\
&=\frac{\left(2x-5\right)\left(2x-11\right)}{{\left(1-x\right)}^{4}}
\end{align}

e^[f(x)]

N) \frac{d}{dx}{e}^{f\left(x\right)} ={e}^{f\left(x\right)}\cdot f'\left(x\right) =f'\left(x\right){e}^{f\left(x\right)}

  • Remember : Derivative of e\, power something, copy back exactly e\, power something, then multiply with the derivative of that something.
  • Note : Normally it is easier to multiply the derivative directly in front so that we don't need to rewrite the answer.
  • Important : If needed, simplify the given function to the form of {e}^{f\left(x\right)} before differentiating
  • Note: The {\color{Blue}f'\left(x\right)}{e}^{{\color{Blue}f\left(x\right)}} has nothing to do with \frac{d}{dx}x^{n}={\color{Blue}n}x^{{\color{Blue}n-1}}.


You can try the prove yourself, but it is more important for us to remember and use the formula correctly for now.


Comparing with the basic formula

  • \frac{d}{dx}{e}^{x} ={e}^{x} \,
  • \frac{d}{dx}{e}^{f\left(x\right)} ={e}^{f\left(x\right)}\cdot f'\left(x\right)
  • Now, for \frac{d}{dx}{a}^{x} ={a}^{x}\ln a\,
    • Can you guess the formula for \frac{d}{dx}{a}^{f\left(x\right)}?
    • \frac{d}{dx}{a}^{f\left(x\right)} ={a}^{f\left(x\right)}\ln a \cdot f'\left(x\right), though again, we will normally write the derivative in front.


O) \frac{d}{dx}{a}^{f\left(x\right)} =f'\left(x\right){a}^{f\left(x\right)}\ln a

Examples

Differentiate the following w.r.t. x\,

  • y={e}^{2x}\, \frac{dy}{dx}=2{e}^{2x}
    • Analyze : e\, power something.
      • Copy exactly that e\, power something (leaving some space in front) \frac{dy}{dx}=\qquad{\color{Red}{e}^{2x}}
      • Multiply derivative of that something, write in directly in front. \frac{dy}{dx}={\color{Red}2}{e}^{2x}
  • y={e}^{3x+1}\, \frac{dy}{dx}=3{e}^{3x+1}
  • y={e}^{1-{x}^{2}}\, \frac{dy}{dx}=-2x{e}^{1-{x}^{2}}
  • y={e}^{-x}\, \frac{dy}{dx}=-{e}^{-x}
  • y=\frac{1}{{e}^{3x}} \frac{dy}{dx}=-3{e}^{-3x} or \frac{dy}{dx}=-\frac{3}{{e}^{3x}}
    • Analyze : It looks like 1 over something, but look carefully and you will see that we can change it to e\, power something by using simple index law.
      • y=\frac{1}{{e}^{3x}} ={e}^{-3x}\,
      • \frac{dy}{dx}=-3{e}^{-3x} or \frac{dy}{dx}=-\frac{3}{{e}^{3x}}
  • y=\sqrt{{e}^{x}} \frac{dy}{dx}=\frac{1}{2}{e}^{\frac{1}{2}x} or \frac{dy}{dx}=\frac{1}{2}\sqrt{{e}^{x}}
    • Analyze : Again, it looks like square root something (which will need the something power n formula, but look carefully and you will see that we can change it to e\, power something. Note that \sqrt{{e}^{x}} ={\left({e}^{x}\right)}^{\frac{1}{2}} ={e}^{\frac{1}{2}x}
      • y=\sqrt{{e}^{x}} ={e}^{\frac{1}{2}x}
      • \frac{dy}{dx}=\frac{1}{2}{e}^{\frac{1}{2}x} or \frac{dy}{dx}=\frac{1}{2}\sqrt{{e}^{x}}
  • y={e}^{\sin x}\, \frac{dy}{dx}={e}^{\sin x}\cos x \,
    • Note that here we write the \cos x\, behind, else we would need to write it as \left(\cos x\right){e}^{\sin x} ,since \cos x{e}^{\sin x}\, is ambiguous.
  • y={e}^{\tan x}\, \frac{dy}{dx}={e}^{\tan x}{\sec}^{2}x \,
  • y=\frac{{e}^{2x}-{e}^{-2x}}{{e}^{x}} \frac{dy}{dx}={e}^{x}+3{e}^{-3x}\,
    • Analyze : It looks like something over something, but look carefully and you will see that we can break apart the fraction (Note : We can break apart \frac{a+b}{c} but not \frac{a}{b+c} ) and then simplify using index laws.
      • y=\frac{{e}^{2x}-{e}^{-2x}}{{e}^{x}} ={e}^{x}-{e}^{-3x}\,
      • \frac{dy}{dx}={e}^{x}+3{e}^{-3x}

ln[f(x)]

P) \frac{d}{dx}\ln\left[f\left(x \right)\right] =\frac{1}{f\left(x\right)}\cdot f'\left(x\right) =\frac{f'\left(x\right)}{f\left(x\right)}

  • Remember : Derivative of \ln\, something, copy that something, put it below, then find derivative of that something, put it on top.
  • Note : Normally it is easier to do it directly like the suggested method rather than having to multiply.

Comparing with the other composite formula, we see that the pattern is really the same:

  • \frac{d}{dx}{{\color{Blue}x}}^{n}=n{{\color{Blue}x}}^{n-1}
    • \frac{d}{dx}{\left[{\color{Blue}f\left(x\right)}\right]}^{n} =n{\left[{\color{Blue}f\left(x\right)}\right]}^{n-1}\cdot {\color{Red}f'\left(x\right)}
  • \frac{d}{dx}{e}^{{\color{Blue}x}}={e}^{{\color{Blue}x}}
    • \frac{d}{dx}{e}^{{\color{Blue}f\left(x\right)}}={\color{Red}f'\left(x\right)}{e}^{{\color{Blue}f\left(x\right)}}
  • \frac{d}{dx}\ln {\color{Blue}x} =\frac{1}{{\color{Blue}x}}
    • \frac{d}{dx}\ln\left[{\color{Blue}f\left(x\right)}\right]=\frac{{\color{Red}f'\left(x\right)}}{{\color{Blue}f\left(x\right)}}

Whereby we just

  • substitute any {\color{Blue}x} with {\color{Blue}f\left(x\right)}
  • and multiply an extra {\color{Red}f'\left(x\right)}

Using Index Laws

Note that

  • \ln xy\, =\ln x+\ln y\,
  • \ln \frac{x}{y} =\ln x-\ln y\,
  • \ln\left(x+y\right) Nothing we can do. ;-)
  • \ln {x}^{n}\, =n\ln x\,

Take a good look at each law. Which side (right or left) would be easier to differentiate? The right hand side, of course.

  • The left hand sides require formula for uv\,, \frac{u}{v} and {x}^{n}\,, none of it which is easy.
  • The right hand sides, on the other hand, just require formula for f\left(x\right)\pm g\left(x \right) and c\left[ f\left(x \right)\right], which is much easier.

Thus, ALWAYS check whether we can simplify first when we differentiate ln functions.

Examples

  • y=\ln\left(3x+1\right) \frac{dy}{dx}=\frac{3}{3x+1}
    • Analyze : \ln\, something.
      • Copy that something, put it below \frac{dy}{dx}=\frac{}{{\color{Red}3x+1}}
      • Derivative of that something, write in on top \frac{dy}{dx}=\frac{{\color{Red}3}}{3x+1}
  • y=\ln\left({x}^2+1\right) \frac{dy}{dx}=\frac{2x}{{x}^2+1}
  • y=\ln \left(\sin x\right) \frac{dy}{dx}=\frac{\cos x}{\sin x} or \frac{dy}{dx}=\cot x
  • y=\ln{\left(x+1\right)}^{3} \frac{dy}{dx}=\frac{3}{x+1}
    • Analyze : \ln\, something. Can we simpflify? Yes.
      • y=\ln{\left(x+1\right)}^{3} =3\ln\left(x+1\right)
      • \frac{dy}{dx}=\frac{3}{x+1}

  • y=\ln\sqrt{x} \frac{dy}{dx}=\frac{1}{2x}
    • y=\ln\sqrt{x} =\frac{1}{2}\ln x
      • \frac{dy}{dx}=\frac{1}{2x}

  • y=\ln\left(\frac{5}{{x}^{4}}\right) \frac{dy}{dx}=-\frac{4}{x}
    • 
y=\ln\left(\frac{5}{{x}^{4}}\right) 
=\ln 5-4 \ln x\, ( Note that \ln 5\, is a constant.)
      • \frac{dy}{dx}=-\frac{4}{x}

  • y=\ln\sqrt{3x-1} \frac{dy}{dx}=\frac{3}{2\left(3x-1\right)}
    • y=\ln\sqrt{3x-1} =\frac{1}{2}\ln\left(3x-1\right)
      • \frac{dy}{dx}=\frac{3}{2\left(3x-1\right)}

  • y=\ln\sqrt[3]{\frac{1-x}{{\left(1+x\right)}^{2}}} \frac{dy}{dx}=-\frac{1}{3\left(1-x\right)}-\frac{2}{3\left(1+x\right)}
    • y=\ln\sqrt[3]{\frac{1-x}{{\left(1+x\right)}^{2}}} =\frac{1}{3}\ln\left(1-x\right)-\frac{2}{3}\ln\left(1+x\right)
      • \frac{dy}{dx}=-\frac{1}{3\left(1-x\right)}-\frac{2}{3\left(1+x\right)}

  • y=\ln\left({x}^{2}{e}^{x}\right) \frac{dy}{dx}=\frac{2}{x}+1
    • y=\ln\left({x}^{2}{e}^{x}\right) =2\ln x+\ln {e}^{x}\, =2\ln x+x\,
      • \frac{dy}{dx}=\frac{2}{x}+1

sin[f(x)], cos[f(x)], tan[f(x)]

You should be able to guess the following formulas already

Q) \frac{d}{dx}\sin\left[f\left(x\right)\right] =f'\left(x\right)\cos\left[f\left(x\right)\right]

R) \frac{d}{dx}\cos\left[f\left(x\right)\right] =-f'\left(x\right)\sin\left[f\left(x\right)\right]

S) \frac{d}{dx}\tan\left[f\left(x\right)\right] =f'\left(x\right){\sec}^{2}\left[f\left(x\right)\right]

  • If you still can't see why
    • \frac{d}{dx}\sin{\color{Blue}x}=\cos{\color{Blue}x}
    • \frac{d}{dx}\sin{\color{Blue}f\left(x\right)}={\color{Red}f'\left(x\right)}\cos{\color{Blue}f\left(x\right)}
    • \frac{d}{dx}\cos{\color{Blue}x}=-\sin{\color{Blue}x}
    • \frac{d}{dx}\cos{\color{Blue}f\left(x\right)}=-{\color{Red}f'\left(x\right)}\sin{\color{Blue}f\left(x\right)}
    • \frac{d}{dx}\tan{\color{Blue}x}={\sec}^{2}{\color{Blue}x}
    • \frac{d}{dx}\tan{\color{Blue}f\left(x\right)}=-{\color{Red}f'\left(x\right)}{\sec}^{2}{\color{Blue}f\left(x\right)}

  • Remember : Sin something become cos something, cos something become negative sin something, tan something become sec square something, ALL need to multiply f'\left(x\right).

Note : As with \ln\,, it is easier to multiply the derivative directly in front so that we don't need to rewrite the answer.

Common Mistakes

Remember that, for sin something, for example, we need to

  • change it to cos
  • copy that something
  • then only multiply the derivative

It is very easy to carelessly skip the second step, so take the time to learn the structure correctly. For example, when we do something such as y=\sin \left(\ln x\right), if we do it too quickly, we might carelessly end up with \frac{dy}{dx}=\cos \left(\frac{1}{x}\right) when it should have been \frac{dy}{dx}=\frac{1}{x}\cos \left(\ln x\right).

Examples

  • \frac{d}{dx}\sin 3x =3\cos 3x\,
    • Analysis: sin something
      • sin becomes cos (leave some space in front) \frac{d}{dx}\sin 3x=\qquad{\color{Red}\cos}
      • copy that something \frac{d}{dx}\sin 3x=\qquad\cos{\color{Red}3x}
      • then only differentiate that something and put it in front \frac{d}{dx}\sin 3x={\color{Red}3}\cos3x
  • \frac{d}{dx}\tan \left(3x-1\right) =3{\sec}^{2}\left(3x-1\right)\,
  • \frac{d}{dx}\cos \left({x}^2+1\right) =-2x\sin\left({x}^2+1\right)\,
    • The more complicated it gets, the more we need to make sure our basic steps are correct
      • cos something becomes negative sin something \frac{d}{dx}\cos \left({x}^2+1\right)={\color{Red}-\qquad\sin \left({x}^2+1\right)}
      • then only we differentiate that something' and put it in front \frac{d}{dx}\cos \left({x}^2+1\right)=-{\color{Red}2x}\sin \left({x}^2+1\right)

  • \frac{d}{dx}\sin \left(\frac{1}{x}\right) =-\frac{1}{{x}^{2}}\cos\left(\frac{1}{x}\right)
    • \frac{d}{dx}\sin \left(\frac{1}{x}\right) ={\color{Red}\qquad \cos \left(\frac{1}{x}\right)}
      • \frac{d}{dx}\sin \left(\frac{1}{x}\right) ={\color{Red}-\frac{1}{{x}^{2}}}\cos \left(\frac{1}{x}\right)
      • Note: As before, we do the derivative of \left(\frac{1}{x}\right) directly or by side working. DO NOT try to do in the middle of everything, such as writting \sin \left({x}^{-1}\right)

  • \frac{d}{dx}\cos \sqrt{x} =-\frac{1}{2\sqrt{x}}\sin\sqrt{x}
  • \frac{d}{dx}\tan \left({e}^{x}\right) ={e}^{x}{\sec}^{2}\left({e}^{x}\right)

Exercise 4

Differentiate the following w.r.t. x\,

a) y={e}^{3x}-4{e}^{-2x}+{e}^{{x}^{2}}+3\sqrt{{e}^{x}}+\frac{1}{\sqrt{{e}^{x}}}

  • \frac{dy}{dx}=3{e}^{3x}+8{e}^{-2x}+2x{e}^{{x}^{2}}+\frac{3}{2}\sqrt{{e}^{x}}-\frac{1}{2\sqrt{{e}^{x}}}
    • \begin{align}
y&={e}^{3x}-4{e}^{-2x}+{e}^{{x}^{2}}+3\sqrt{{e}^{x}}+\frac{1}{\sqrt{{e}^{x}}}\\
&={e}^{3x}-4{e}^{-2x}+{e}^{{x}^{2}}+3{e}^{\frac{1}{2}x}+{e}^{-\frac{1}{2}x}\\
\frac{dy}{dx}&=3{e}^{3x}+8{e}^{-2x}+2x{e}^{{x}^{2}}+\frac{3}{2}{e}^{\frac{1}{2}x}-\frac{1}{2}{e}^{-\frac{1}{2}x}\\
&=3{e}^{3x}+8{e}^{-2x}+2x{e}^{{x}^{2}}+\frac{3}{2}\sqrt{{e}^{x}}-\frac{1}{2\sqrt{{e}^{x}}}\\
\end{align}

b) y={e}^{\cos x}-2{e}^{\frac{3}{x}}+4{e}^{\sqrt{x}+1}+{e}^{\tan x+\ln x}

  • 
\frac{dy}{dx}=-{e}^{\cos x}\sin x+\frac{6}{{x}^{2}}{e}^{\frac{3}{x}}+\frac{2}{\sqrt{x}}{e}^{\sqrt{x}+1}+\left({\sec}^{2}x+\frac{1}{x}\right){e}^{\tan x+\ln x}
    • \begin{align}
\frac{dy}{dx}&=\left(-\sin x\right){e}^{\cos x}-2\left(-\frac{3}{{x}^{2}}\right){e}^{\frac{3}{x}}+4\left(\frac{1}{2\sqrt{x}}\right){e}^{\sqrt{x}+1}+\left({\sec}^{2}x+\frac{1}{x}\right){e}^{\tan x+\ln x}\\
&=-{e}^{\cos x}\sin x+\frac{6}{{x}^{2}}{e}^{\frac{3}{x}}+\frac{2}{\sqrt{x}}{e}^{\sqrt{x}+1}+\left({\sec}^{2}x+\frac{1}{x}\right){e}^{\tan x+\ln x}\\
\end{align}

c) y=\frac{4{e}^{3x}-2{e}^{-3x}}{{e}^{2x}}

  • \frac{dy}{dx}=4{e}^{x}+10{e}^{-5x}
    • \begin{align}
y& =\frac{4{e}^{3x}-2{e}^{-3x}}{{e}^{2x}}\\
&=4{e}^{x}-2{e}^{-5x}\\
\frac{dy}{dx}& =4{e}^{x}+10{e}^{-5x}
\end{align}

d) y=\ln\left(2x-1\right)-2\ln\left(7-3x \right) \frac{dy}{dx}= \frac{2}{2x-1}+\frac{6}{7-3x}

    • \begin{align}
\frac{dy}{dx} &= \frac{2}{2x-1}-2\left(\frac{-3}{7-3x}\right)\\
&= \frac{2}{2x-1}+\frac{6}{7-3x} \\
\end{align}

e) y=\ln\left(3{x}^{2}-4\right)

  • \frac{dy}{dx}= \frac{6x}{3{x}^{2}-4}

f) y=3\ln\left(\cos x\right)-2\ln\left(\sin x \right)

  • \frac{dy}{dx}= -\frac{3\sin x}{\cos x}-\frac{2\cos x}{\sin x}

g) y=\ln\left({e}^{x}+4\right)+\ln\left(\sin x +\cos x \right)

  • \frac{dy}{dx}= \frac{{e}^{x}}{{e}^{x}+4}+\frac{\cos x-\sin x}{\sin x+\cos x}

h) y=3\ln\left(\frac{5}{{x}^{2}}\right)-\ln\sqrt{\frac{4}{{x}^{3}}}

  • \frac{dy}{dx}=-\frac{9}{2x}
    • \begin{align}
y& =3\ln\left(\frac{5}{{x}^{2}}\right)-\ln\sqrt{\frac{4}{{x}^{3}}}\\
& =3\ln 5 -6\ln x -\left( \frac{1}{2}\ln 4 -\frac{3}{2}\ln x\right)\\
\frac{dy}{dx} &= -\frac{6}{x}+\frac{3}{2x}\\
& =-\frac{9}{2x}
\end{align}

i) y=\ln\sqrt{1-{x}^{2}}+\ln {\left(3{x}^{2}+4 \right)}^{3}

  • \frac{dy}{dx}=-\frac{x}{1-{x}^{2}}+\frac{18x}{3{x}^{2}+4}
    • \begin{align}
y& =\ln\sqrt{1-{x}^{2}}+\ln {\left(3{x}^{2}+4 \right)}^{3} \\
& =\frac{1}{2}\ln\left(1-{x}^{2}\right)+3\ln\left(3{x}^{2}+4 \right) \\
\frac{dy}{dx} &= \frac{-2x}{2\left(1-{x}^{2}\right)}+\frac{3\left(6x\right)}{3{x}^{2}+4}\\
& =-\frac{x}{1-{x}^{2}}+\frac{18x}{3{x}^{2}+4}
\end{align}

j) y=\ln\left(\frac{1+x}{1-x}\right)

  • \frac{dy}{dx}=\frac{2}{\left(1+x\right)\left(1-x\right)}
    • \begin{align}
y& =\ln\left(\frac{1+x}{1-x}\right)\\
& =\ln\left(1+x\right)-\ln\left(1-x\right) \\
\frac{dy}{dx} &=\frac{1}{1+x}-\frac{\left(-1 \right)}{1-x} \\
& =\frac{1-x+1+x}{\left(1+x\right)\left(1-x\right)}\\
& =\frac{2}{\left(1+x\right)\left(1-x\right)}
\end{align}

k) y=\ln\left[{\left(2x+1\right)}^{3}{\left(x-2\right)}^{5}\right]

  • \frac{dy}{dx}=\frac{6}{2x+1}+\frac{5}{x-2}
    • \begin{align}
y& =\ln\left[{\left(2x+1\right)}^{3}{\left(x-2\right)}^{5}\right]\\
& =3\ln\left(2x+1\right)+5\ln\left(x-2\right)\\
\frac{dy}{dx}& =\frac{6}{2x+1}+\frac{5}{x-2}\\
\end{align}

l) y=\ln\frac{{\left({x}^{2}-3\right)}^{4}}{\left(1-2x \right)}

  • \frac{dy}{dx}=\frac{8x}{{x}^{2}-3}+\frac{2}{1-2x}
    • \begin{align}
y&=\ln\frac{{\left({x}^{2}-3\right)}^{4}}{\left(1-2x \right)}\\
&=4\ln\left({x}^{2}-3\right)-\ln\left(1-2x \right)\\
\frac{dy}{dx}&=\frac{8x}{{x}^{2}-3}+\frac{2}{1-2x}
\end{align}

m) y=\ln\sqrt{\frac{1+x}{1-x}}

  • \frac{dy}{dx}=\frac{1}{\left(1+x\right)\left(1-x\right)}
    • 
\begin{align}
y& =\ln\sqrt{\frac{1+x}{1-x}}\\
& =\frac{1}{2}\left[\ln\left(1+x\right)-\ln\left(1-x\right)\right] \\
\frac{dy}{dx} &=\frac{1}{2}\left[ \frac{1}{1+x}-\frac{\left(-1 \right)}{1-x}\right] \\
& =\frac{1}{2}\left[ \frac{1-x+1+x}{\left(1+x\right)\left(1-x\right)}\right]\\
& =\frac{1}{\left(1+x\right)\left(1-x\right)}
\end{align}

n) y=\ln\sqrt[3]{\frac{{\left(3x-1\right)}^{4}}{{x}^{2}}}

  • \frac{dy}{dx}=\frac{4}{3x-1}-\frac{2}{3x}
    • \begin{align}
y& =\ln\sqrt[3]{\frac{{\left(3x-1\right)}^{4}}{{x}^{2}}}\\
& =\frac{4}{3}\ln \left(3x-1\right)-\frac{2}{3}\ln x \\
\frac{dy}{dx} &=\frac{4\left(3\right)}{3\left(3x-1\right)}-\frac{2}{3x} \\
& =\frac{4}{3x-1}-\frac{2}{3x}
\end{align}

o) y=\sin3x+3\cos\left(2x-1\right)+\tan\left(1-x\right)

  • \frac{dy}{dx}=3\cos 3x-6\sin\left(2x-1\right)-{\sec}^{2}\left(1-x\right)

p) y=\cos\left(\pi x\right)+\sin\left(\frac{\pi}{3}x\right)-\sin\left(\pi+x\right)

  • \frac{dy}{dx}=-\pi\sin\left(\pi x\right)+\frac{\pi}{3}\cos\left(\frac{\pi}{3}x\right)-\cos\left(\pi+x\right)

q) y=\tan\left({e}^{x}+2\right)+\cos\left(2\sqrt{x}\right)-\sin\left(\frac{3}{x}\right)

  • \frac{dy}{dx}={e}^{x}{\sec}^{2}\left({e}^{x}+2\right)-\frac{\sin\left(2\sqrt{x}\right)}{\sqrt{x}}+\frac{3}{{x}^{2}}\cos\left(\frac{3}{x}\right)
    • \begin{align}
\frac{dy}{dx}&={e}^{x}{\sec}^{2}\left({e}^{x}+2\right)-\frac{2}{2\sqrt{x}}\sin\left(2\sqrt{x}\right)-\left( -\frac{3}{{x}^{2}}\right)\cos\left(\frac{3}{x}\right)\\
&={e}^{x}{\sec}^{2}\left({e}^{x}+2\right)-\frac{\sin\left(2\sqrt{x}\right)}{\sqrt{x}}+\frac{3}{{x}^{2}}\cos\left(\frac{3}{x}\right)
\end{align}

r) y=\sqrt{{e}^{x}}+{e}^{\sqrt{x}}+\frac{1}{{e}^{x}}+{e}^{\frac{1}{x}}

  • \frac{dy}{dx}=\frac{1}{2}\sqrt{{e}^{x}}+\frac{{e}^{\sqrt{x}}}{2\sqrt{x}}-{e}^{-x}-\frac{1}{{x}^{2}}{e}^{\frac{1}{x}}
    • \begin{align}
y&=\sqrt{{e}^{x}}+{e}^{\sqrt{x}}+\frac{1}{{e}^{x}}+{e}^{\frac{1}{x}}\\
&={e}^{\frac{1}{2}x}+{e}^{\sqrt{x}}+{e}^{-x}+{e}^{\frac{1}{x}}\\
\frac{dy}{dx}&=\frac{1}{2}{e}^{\frac{1}{2}x}+\frac{1}{2\sqrt{x}}{e}^{\sqrt{x}}-{e}^{-x}+\left( -\frac{1}{{x}^{2}}\right){e}^{\frac{1}{x}}\\
&=\frac{1}{2}\sqrt{{e}^{x}}+\frac{{e}^{\sqrt{x}}}{2\sqrt{x}}-{e}^{-x}-\frac{1}{{x}^{2}}{e}^{\frac{1}{x}}
\end{align}

s) y=\sin\left({e}^{x}\right)+{e}^{\sin x}+\ln\left(\sin x\right)+\sin\left(\ln x\right)

  • \frac{dy}{dx}={e}^{x}\cos\left({e}^{x}\right)+{e}^{\sin x}\cos x+\frac{\cos x}{\sin x}+\frac{1}{x}\cos\left(\ln x\right)
Personal tools