[Math] Finding local maximum of solution of a differential equation

calculusmaxima-minimaordinary differential equations

The problem is this:

Given the differential equation
$$y' + \frac{1}{2}y = 2\cos t, y(0)=-1$$
Find the coordinates of the first local maximum for the solution when $t>0$

I'm not sure, how to proceed here. I have found the solution given the initial condition which is

$$y(t) = \frac{1}{5}(-9e^{-t/2} + 8 \sin t + 4 \cos t)$$

and from my calculus courses I remember that you have to set $y'(t)=0$ to find the critical points, so I did and got

$$y'(t)=0 \Rightarrow \frac{9}{2}e^{-t/2} + 8 \cos t – 4 \sin t = 0$$

This seems to suggest an infinite number of local maxima and minima for $t>0$, which I corroborated by looking at a graph of the function.

enter image description here

Using wolfram I found that the first local maximum is at $t\approx 1.36431,$ but I haven't had a course on numerical apporximation, so my question is:

Is there an analytic method for finding this local maximum?

I appreciate any help!

Note: There is an identical question here:Given: $y'+\frac{1}{2}y =2\cos t, \ y(0) = -1$ to find the coordinates of the first local maximum point $t>0$ but it never got answered so I hope this one doesn't get closed. Thanks!

Best Answer

As you suspect, using numerical methods will solve the problem easily but we shall not use any of them and we shall try to approximate the solution of the transcendental equation which, by definition, cannot show any analytical expression.

Considering the first derivative $$y'(t)= \frac{9}{2}e^{-t/2} + 8 \cos(t) - 4 \sin( t) $$ and using your observation from the plot, let us consider Taylor series built around $t=a$. They are $$e^x=e^{-a}-e^{-a} (x-a)+\frac{1}{2} e^{-a} (x-a)^2+O\left((x-a)^3\right)$$ $$\sin (x)=\sin (a)+(x-a) \cos (a)-\frac{1}{2} (x-a)^2 \sin (a)+O\left((x-a)^3\right)$$ $$\cos(x)=\cos (a)-(x-a) \sin (a)-\frac{1}{2} (x-a)^2 \cos (a)+O\left((x-a)^3\right)$$ Applying them (using for simplicity $a=\frac \pi 2$), we then have $$y'(t)=\left(\frac{9 e^{-\pi /4}}{10}-\frac{4}{5}\right)-\left(\frac{8}{5}+\frac{9 e^{-\pi /4}}{20}\right) \left(t-\frac{\pi }{2}\right)+\left(\frac{2}{5}+\frac{9 e^{-\pi /4}}{80}\right) \left(t-\frac{\pi }{2}\right)^2+O\left(\left(t-\frac{\pi }{2}\right)^3\right)$$ which then reduces to a quadratic equation in $\left(t-\frac{\pi }{2}\right)$.

Using the classical formula, we then arrive to $$y'(t)=0 \implies t=\frac{\pi }{2}+\frac{2 \left(9+32 e^{\pi /4}-\sqrt{3 \left(-27+48 e^{\pi /4}+512 e^{\pi /2}\right)}\right)}{9+32 e^{\pi /4}}\approx 1.36548$$ while the exact solution would be $t\approx 1.36431$ which seems to be quite good.

Using the result of the approximation, the maximum would be $\approx 0.820081$ while the exact solution would be $\approx 0.820082$.

Edit

We could have done better using $a=\frac{5 \pi }{12}$ (we know the values of the trigonometric functions for this angle). Doing the same as above, we should have

$$y'(t)=\left(-3 \sqrt{2}+\sqrt{6}+\frac{9}{2} e^{-5 \pi /24}\right)-\left(\sqrt{2}+3 \sqrt{6}+\frac{9}{4} e^{-5 \pi /24}\right) \left(t-\frac{5 \pi }{12}\right)+\left(\sqrt{6-3 \sqrt{3}}+\frac{9}{16} e^{-5 \pi /24}\right) \left(t-\frac{5 \pi }{12}\right)^2+O\left(\left(t-\frac{5 \pi }{12}\right)^3\right)$$ Ignoring the quadratic term, the zero would be given as $t\approx 1.36392$. Using the quadratic term, $t\approx 1.36429$.

Related Question