Analyzing the Setup
The given differential equation is:
This is a classic Linear Differential Equation of the form dxdy+Py=Q. By comparing terms, we identify:
The Magic of the Integrating Factor
To solve this, we calculate the Integrating Factor (I.F.), defined as e∫Pdx:
I.F.=e∫2tanxdx=e2ln∣secx∣
Using the logarithmic property nlna=lnan, the expression simplifies elegantly:
The Integration and the Constant
The general solution is given by y⋅(I.F.)=∫Q⋅(I.F.)dx+C. Substituting our values:
We simplify the integral by rewriting the integrand:
∫cos2xsinxdx=∫tanxsecxdx=secx
Thus, the general solution is:
We apply the initial condition y(3π)=0 to determine the constant C:
The Final Optimization
Substituting C=−2 into our equation, we obtain the specific function:
ysec2x=secx−2⇒y=cosx−2cos2x
To find the maximum value, let t=cosx. The function becomes a downward-opening parabola:
The maximum occurs at the vertex, where the derivative with respect to t is zero:
Substituting t=41 back into the expression for y:
ymax=41−2(41)2=41−162=41−81=81
The maximum value of the function is 81.