Calculation of higher-order derivatives.

Literature: Collection of Problems in Mathematics. Part 1. Edited by A.V. Efimov, B.P. Demidovich.

The second-order derivative of a function $y=f(x)$ is called the derivative of its first derivative, i.e., $$y''(x)=(y'(x))'.$$

The $n$-th order derivative (or $n$-th derivative) is defined as the derivative of the $(n-1)$-th order derivative, i.e., $$y^{(n)}(x)=\left(y^{(n-1)}(x)\right)',\qquad n=2, 3, ...$$ For the $n$-th order derivative, the notation $\frac{d^ny}{dx^n}$ is used.

Let $u(x)$ and $v(x)$ have derivatives up to the $n$-th order inclusive. Then, for the $n$-th order derivative of their product $u(x)v(x)$, the Leibniz formula applies:a $$(uv)^{(n)}=u^{n}v+nu^{(n-1)}v'+\frac{n(n-1)}{1\cdot 2}u^{(n-1)}v''+...+uv^{(n)}=\sum\limits_{k=0}^nC_{n}^ku^{(n-k)}v^{(k)},$$ where $u^{(0)}=u,,, v^{(0)}=v$ and $C_n^k=\frac{n(n-1)...(n-k+1)}{1\cdot2\cdot...\cdot k}=\frac{k!}{(n-k)!}$ are binomial coefficients (by definition, $0!=1$).

Examples.

Find the second-order derivatives of the following functions:

5.184. $y=\cos^2 x.$

Solution.

$y'=(\cos^2 x)'=2\cos x(\cos x)'=-2\cos x\sin x=-\sin 2x;$

$y''=(-\sin 2x)'=-\cos 2x (2x)'=-2\cos 2x.$

Answer: $-2\cos 2x.$

5.187. $y=e^{-x^2}.$

Solution.

$y'=(e^{-x^2})'=e^{-x^2}(-x^2)'=e^{-x^2}(-2x)=-2xe^{-x^2}.$

$$y''=(-2xe^{-x^2})''=(-2x)'e^{-x^2}-2x(e^{-x^2})'=-2e^{-x^2}-2xe^{-x^2}(-2x)=$$ $$=-2e^{-x^2}+4x^2e^{-x^2}.$$

Answer: $y''=-2e^{-x^2}+4x^2e^{-x^2}.$

5.191. Find $y'''(2),$ если $y=\ln(x-1).$

Solution.

$y'=(\ln(x-1))'=\frac{1}{x-1}(x-1)'=\frac{1}{x-1};$

$y''=\left(\frac{1}{x-1}\right)'=((x-1)^{-1})'=-1(x-1)^{-2}(x-1)'=-(x-1)^{-2};$

$y'''=(-(x-1)^{-2})'=-(-2)(x-1)^{-3}=2\frac{1}{(x-1)^3};$

$y'''(2)=2\frac{1}{(2-1)^3}=2.$

Answer: 2.

Let $u(x)$ and $v(x)$ be twice differentiable functions. Find $y',,, y''$ if:

5.197. $y=\sqrt{u^2+v^2}.$

Solution.

$$y'=(\sqrt{u^2+v^2})'=((u^2+v^2)^{1/2})'=\frac{1}{2}(u^2+v^2)^{-1/2}(u^2+v^2)'=$$ $$=\frac{1}{2}(u^2+v^2)^{-1/2}(2uu'+2vv')=\frac{uu'+vv'}{\sqrt{u^2+v^2}};$$

$$y''=\left((u^2+v^2)^{-1/2}(uu'+vv')\right)'=$$ $$=\left(-\frac{1}{2}\right)(u^2+v^2)^{-1/2-1}(u^2+v^2)'(uu'+vv')+$$ $$+(u^2+v^2)^{-1/2}(u'u'+uu''+v'v'+vv'')=$$ $$=-\frac{1}{2}(u^2+v^2)^{-3/2}(uu'+vv')(2uu'+2vv')+$$ $$+(u^2+v^2)^{-1/2}(u'^2+uu''+v'^2+vv'')=$$ $$-(u^2+v^2)^{-3/2}(uu'+vv')^2+(u^2+v^2)^{-1/2}(u'^2+uu''+v'^2+vv'')=$$ $$=\frac{-(uu'+vv')+(u^2+v^2)(u'^2+uu''+v'^2+vv'')}{(u^2+v^2)^{3/2}}$$

Answer: $\frac{-(uu'+vv')+(u^2+v^2)(u'^2+uu''+v'^2+vv'')}{(u^2+v^2)^{3/2}}.$

Find the formula for the $n$-th derivative of the given functions:

5.199. $y=x^m,\,\, m\in N.$

Solution.

$y'=(x^m)'=mx^{m-1};$

$y''=(mx^{m-1})'=m(m-1)x^{m-2};$

$y'''=(m(m-1)x^{m-2})'=m(m-1)(m-2)x^{m-3};$

...

$y^{(n)}=m(m-1)(m-2)...(m-n+1)x^{m-n}=\frac{m!}{(m-n+1)!}x^{m-n}, n\leq m$

$y^{(n)}=m(m-1)(m-2)...(m-m)...(m-n+1)x^{m-n}=0, n>m.$

Answer: $y^{(n)}=\frac{m!}{(m-n+1)!}x^{m-n}, n\leq m;$ $y^{(n)}=0, n>m.$

5.201. $y=\sin x.$

Solution.

$y'=(\sin x)'=\cos x=\sin(x+\frac{\pi}{2});$

$y''=(\cos x)'=-\sin x=\sin(x+\pi);$

$y'''=(-\sin x)'=-\cos x=\sin(x+\frac{3\pi}{2});$

$y^{(4)}=(-cos x)'=\sin x=\sin(x+2\pi)=\sin(x+\frac{4\pi}{2});$

...

$y^{(n)}=\sin\left(x+\frac{\pi}{2}n\right).$

Answer: $y^{(n)}=\sin\left(x+\frac{\pi}{2}n\right).$

5.204. $y=\frac{1+x}{1-x}.$

Solution.

$$y'=\left(\frac{1+x}{1-x}\right)'=\frac{(1+x)'(1-x)-(1-x)'(1+x)}{(1-x)^2}=$$ $$=\frac{1-x+1+x}{(1-x)^2}=\frac{2}{(1-x)^2}.$$

$$y''=\left(\frac{2}{(1-x)^2}\right)'=2\left((1-x)^{-2})\right)'=2\cdot(-2)(1-x)^{-2-1}(1-x)'=$$ $$=2\cdot 2(1-x)^{-3}.$$

$$y'''=\left(2\cdot 2(1-x)^{-3}\right)'=2\cdot 2\cdot (-3)(1-x)^{-4}(-1)=2\cdot 2\cdot 3(1-x)^{-4}.$$

$$...$$

$$y^{(n)}=2n!(1-x)^{-n-1}.$$

Answer: $y^{(n)}=2n!(1-x)^{-n-1}.$

5.206. By decomposing into a linear combination of simpler functions, find the derivative $y^{(50)}$ of the function $y=\frac{1}{x^2-3x+2}.$

Solution.

Let's decompose the fraction $\frac{1}{x^2-3x+2}$ into elementary fractions:

$x^2-3x+2=0$

$D=9-8=1$

$x_1=\frac{3+1}{2}=2;$ $x_2=\frac{3-1}{2}=1.$

Thus, $x^2-3x+2=(x-1)(x-2).$

Hence, $\frac{1}{x^2-3x+2}=\frac{A}{x-1}+\frac{B}{x-2}=\frac{Ax-2A+Bx-B}{(x-1)(x-2)}.$

Therefore, $1=Ax-2A+Bx-B.$

We equate the coefficients of like terms:

$$\left\{\begin{array}{lcl}1=-2A-B\\0=A+B\end{array}\right.\Rightarrow\left\{\begin{array}{lcl}1=2B-B\\B=-A\end{array}\right.\Rightarrow\left\{\begin{array}{lcl}B=1\\A=-1\end{array}\right.$$

$y'=\left(\frac{1}{x^2-3x+2}\right)'=\left(-\frac{1}{x-1}+\frac{1}{x-2}\right)'=$ $=-((x-1)^{-1})'+((x-2)^{-1})'=(x-1)^{-2}-(x-2)^{-2}.$

$y''=\left(\frac{1}{x^2-3x+2}\right)''=\left(-\frac{1}{x-1}+\frac{1}{x-2}\right)''=$ $=-((x-1)^{-1})''+((x-2)^{-1})''=((x-1)^{-2}-(x-2)^{-2})'=$ $=-2(x-1)^{-3}+2(x-2)^{-3}.$

$y'''=\left(\frac{1}{x^2-3x+2}\right)'''=\left(-\frac{1}{x-1}+\frac{1}{x-2}\right)'''=$ $=-((x-1)^{-1})'''+((x-2)^{-1})'''=(-2(x-1)^{-3}+2(x-2)^{-3})'=$ $=2\cdot 3(x-1)^{-4}-2\cdot 3(x-2)^{-4}.$

......

$y^{50}=\left(\frac{1}{x^2-3x+2}\right)^{(50)}=\left(-\frac{1}{x-1}+\frac{1}{x-2}\right)^{(50)}=$ $=-((x-1)^{-1})^{(50)}+((x-2)^{-1})^{(50)}=(-2(x-1)^{-3}+2(x-2)^{-3})'=$ $=-50!(x-1)^{-51}+50!(x-2)^{-51}=50!\left(-\frac{1}{(x-1)^{51}}+\frac{1}{(x-2)^{51}}\right).$

Answer: $y^{(50)}=50!\left(-\frac{1}{(x-1)^{51}}+\frac{1}{(x-2)^{51}}\right)$.

(The answer did not match the one in the book -- their solution is $y^{50}=\frac{(x-1)^{50}-(x-2)^{50}}{(x^2-3x+2)^{51}}.$)

Applying the Leibniz formula, find the specified derivatives of the given functions:

5.208. $y=(x^2+x+1)\sin x$, find $y^{(15)}.$

Solution.

Using the Leibniz formula, we get:

$$y^{(15)}=\left((x^2+x+1)\sin x\right)^{(15)}=(\sin x)^{(15)}(x^2+x+1)+$$ $$+15(\sin x)^{(14)}(x^2+x+1)'+\frac{15\cdot 14}{1\cdot 2}(\sin x)^{(13)}(x^2+x+1)''+$$ $$+\frac{15\cdot 14\cdot 13}{1\cot 2\cdot 3}(\sin x)^{(12)}(x^2+x+1)'''+...+\sin x(x^2+x+1)^{(15)}$$

$$(x^2+x+1)'=2x+1;$$

$$(x^2+x+1)''=(2x+1)'=2;$$

$$(x^2+x+1)'''=2'=0;$$

...

$$(x^2+x+1)^{(15)}=0.$$

From problem 5.201, we write down the derivatives of the sine function:$$\sin^{(15)}x=\sin(x+15\pi/2)=\sin(x+3\pi/2+6\pi)=\sin(x+3\pi/2)=-\cos x;$$

$$\sin^{(14)}x=\sin(x+14\pi/2)=\sin(x+\pi+6\pi)=\sin(x+\pi)=-\sin x;$$

$$\sin^{(13)}x=\sin(x+13\pi/2)=\sin(x+\pi/2+6\pi)=\sin(x+\pi/2)=\cos x.$$

Thus, we find:

$$y^{(15)}=-\cos x(x^2+x+1)+15(-\sin x)(2x+1)+\frac{15\cdot 14}{2}2\cos x=$$ $$=\cos x(-x^2-x-1+209)-15\sin x(2x+1)$$

Answer: $y^{(15)}=\cos x(-x^2-x-1+209)-15\sin x(2x+1)$

5.224. Find the second-order derivative of the function defined implicitly by $y=1+xe^y.$

Solution.

Let's introduce the function $F(x,y):$

$$F(x,y)=y-1-xe^y=0.$$

Let's find the first derivative:

$$F'_x(x,y)=y'-x'e^y-x(e^y)'_x=y'-e^y-xe^y y'=0.$$ ОFrom here, $y'(1-xe^y)=e^y\Rightarrow y'=\frac{e^y}{1-xe^y}.$

Next, we find the second derivative and substitute the found function instead of $y'$:

$$F''_x(x,y)=(y'-e^y-xe^y y')'=y''-e^y y'-x'e^y y'-x(e^y)'y'-xe^y y''=$$

$$=y''-e^y y'-e^y y'-xe^y y'y'-xe^y y''=$$ $$=y''-2e^y\frac{e^y}{1-xe^y}-xe^y\left(\frac{e^y}{1-xe^y}\right)^2-xe^yy''=0.$$

Now, let's find $y'':$

$$y''-xe^yy''=2e^y\frac{e^y}{1-xe^y}+xe^y\left(\frac{e^y}{1-xe^y}\right)^2=0\Rightarrow$$ $$\Rightarrow y''=\frac{\frac{2e^{2y}}{1-xe^y}+\frac{xe^{3y}}{(1-xe^y)^2}}{1-xe^y}=\frac{2e^{2y}(1-xe^y)+xe^{3y}}{(1-xe^y)^3}=$$ $$=\frac{2e^{2y}-2xe^{3y}+xe^{3y}}{(1-xe^y)^3}=\frac{2e^{2y}-xe^{3y}}{(1-xe^y)^3}=e^{2y}\frac{2-xe^y}{(1-xe^y)^3}.$$

Answer: $y''=e^{2y}\frac{2-xe^y}{(1-xe^y)^3}.$