Advanced examples on derivatives

Some examples on more complex derivations than basic formula work. If you need the definition of a derivative explained, go to the derivative of a function article.

First example

Let's start with something not too hard yet.

$$f(x)=x^3\cdot e^{-x}$$

From the function derivative patterns, we know that the derivative of the function ex is again ex. Unfortunately, we can't quite use this simple procedure directly in this example because the exponent contains not just x, but −x, so we have to treat the function as a composite function. However, in the first step we still have to decompose it using the product formula.

$$f^\prime(x)=(x^3)^\prime\cdot e^{-x}+x^3\cdot(e^{-x})^\prime=$$

We will derive the left polynomial using the classical formula, leaving the rest the same:

$$=3x^2\cdot e^{-x}+x^3\cdot(e^{-x})^\prime=$$

Now we have to derive the last function. As we have already discussed, it is a composite function, so we have to derive it according to the rule about composite functions:

$$\begin{eqnarray} f(x)&=&h(g(x))\\ f^\prime(x)&=&h^\prime (g(x))\cdot g^\prime(x) \end{eqnarray}$$

So the derivative of our function would look like this:

$$(e^{-x})^\prime=e^{-x}\cdot(-x)^\prime=e^{-x}\cdot(-1)=-e^{-x}$$

The expression e−x stays the same because the derivative of ex is again ex, and in the first step of the formula we derive the outer function and leave the inner function underivated. In the second step, we multiply our intermediate result by the derivative of the function argument, which is the function −x. The derivative of the function −x is −1. Now we just plug our result into the previous expression:

$$=3x^2\cdot e^{-x}+x^3\cdot(e^{-x})^\prime=3x^2\cdot e^{-x}-x^3\cdot e^{-x}.$$

The second example

Entering the second example:

$$f(x)=\frac{\ln(\cos x)}{\tan x}$$

Here we have a fraction, with one function in the numerator and another function in the denominator. So in the first step we will derive according to the formula for division. After applying the formula, we get:

$$\frac{(\ln(\cos x))^\prime\cdot\tan x-\ln(\cos x)\cdot(\tan x)^\prime}{\tan^2 x}$$

Taking it from the end, we will derive the tangent first, since we can derive it simply by the basic formula. It is true that

$$(\tan x)^\prime=\frac{1}{\cos^2x}.$$

After applying this formula in the numerator of the fraction, we get

$$\frac{(\ln(\cos x))^\prime\cdot\tan x-\ln(\cos x)\cdot\frac{1}{\cos^2x}}{\tan^2 x}$$

Now we need to derive the logarithm. Unfortunately, we have another nested function inside the logarithm, so we get a composite function, and so we have to derive the logarithm in a more complicated way as a composite function. The derivation of the logarithm itself is 1/x, but where we put the argument of the logarithm, i.e. the cosine, after x. Next, we still have to multiply by the derivative of the argument, i.e. the derivative of the cosine. So the derivative of the logarithm will look like this:

$$(\ln(\cos x))^\prime=\frac{1}{\cos x}\cdot(\cos x)^\prime=-\frac{1}{\cos x}\cdot\sin x=-\frac{\sin x}{\cos x}$$

We've got a pretty nice fraction. If you remember goniometry well, you know that this fraction is equal to the tangent. So we can write that the whole thing equals minus the tangent:

$$(\ln(\cos x))^\prime=-\tan x$$

We'll plug that into the previous result:

$$=\frac{(\ln(\cos x))^\prime\cdot\tan x-\ln(\cos x)\cdot\frac{1}{\cos^2x}}{\tan^2 x}=\frac{-\tan x\cdot\tan x-\ln(\cos x)\cdot\frac{1}{\cos^2x}}{\tan^2 x}=$$

We have twice the tangent in the numerator, so we can simply factor it to the square. We can move the logarithm to the numerator of the next fraction.

$$=\frac{-\tan^2 x-\frac{\ln(\cos x)}{\cos^2x}}{\tan^2 x}=$$

Now we can split the numerator and get two fractions

$$=-\frac{\tan^2x}{\tan^2x}-\frac{\frac{\ln(\cos x)}{\cos^2x}}{\tan^2x}=$$

In the first fraction, the numerator equals the denominator, so we get a one. In the second fraction, we can get rid of the fraction in the numerator by expanding the fraction with the expression cos2x.

$$=-1-\frac{\ln(\cos x)}{\cos^2x\cdot\tan^2x}=$$

We can now expand the tangent to the quotient sin(x)/cos(x). But since we have the tangent squared, we also get the numerator and denominator squared in the fraction. Then we can immediately truncate cos2x.

$$=-1-\frac{\ln(\cos x)}{\cos^2x\frac{\sin^2x}{\cos^2x}}=-\frac{\ln(\cos x)}{\sin^2x}-1.$$

This is the final result of the derivation.

The third example

Calculate the derivative of the function

$$f(x)=x^{(x^{\frac12})}.$$

If you can't see it clearly - they're all exponents, so "x squared". In the first step, we first make an adjustment according to the formula:

$$x=e^{\ln x}$$

Use this formula to decompose the first x in our example:

$$f(x)=(e^{\ln x})^{x^{\frac12}}$$

Now we apply the formula for working with powers:

$$(a^b)^c=a^{b\cdot c}$$

We remove the parentheses and put in the product of the highest exponent with the logarithm:

$$f(x)=e^{\ln x\cdot x^{\frac12}}$$

Now we have a function in a form that is easier to derive. This is a composite function and we will derive it as such. The first function is ex, where we put the whole exponent after x and the second function is in the exponent. So by decomposing we get:

$$f^\prime(x)=e^{\ln x\cdot x^{\frac12}}\cdot(\ln x\cdot x^{\frac12})^\prime$$

We will derive the bracket as a product, so we apply the formula for the product.

$$(\ln x\cdot x^{\frac12})^\prime=(\ln x)^\prime\cdot x^{\frac12} + \ln x\cdot (x^{\frac12})^\prime=$$

The derivative of the logarithm is 1/x:

$$=\frac{1}{x}\cdot x^{\frac12} + \ln x\cdot (x^{\frac12})^\prime=$$

Now we derive the second expression, using the classic formula for deriving power functions. So, it applies:

$$\left(x^{\frac12}\right)^\prime=\frac12x^{\frac12-1}=\frac12x^{-\frac12}=\frac{x^{-\frac12}}{2}=\frac{1}{2x^{\frac12}}=\frac{1}{2\sqrt{x}}$$

We plug this result into our calculation:

$$=\frac{1}{x}\cdot x^{\frac12} + \ln x\cdot \frac{1}{2\sqrt{x}}=$$

We can still modify the first product, again using formulas that work with powers:

$$\frac{1}{x}\cdot x^{\frac12}=x^{-1}\cdot x^{\frac12}=x^{-1+\frac12}=x^{-\frac12}=\frac{1}{\sqrt{x}}$$

We rewrite the previous expression using the calculation we just did:

$$=\frac{1}{\sqrt{x}}+\ln x\cdot \frac{1}{2\sqrt{x}}=$$

Finally, we convert the logarithm to the numerator of the fraction:

$$=\frac{1}{\sqrt{x}}+\frac{\ln x}{2\sqrt{x}}=$$

We can expand the first fraction by two, and then we can add the fractions:

$$=\frac{2}{2\sqrt{x}}+\frac{\ln x}{2\sqrt{x}}=\frac{2+\ln x}{2\sqrt{x}}$$

Now we can go back to the whole derivative:

$$f^\prime(x)=e^{\ln x\cdot x^{\frac12}}\cdot\left(\frac{2+\ln x}{2\sqrt{x}}\right)=$$

We'll replace eln x with x:

$$=x^{\sqrt{x}}\cdot\left(\frac{2+\ln x}{2\sqrt{x}}\right).$$

This gives us the final result.