Analyzing the Setup
We are given the differential equation:
dxdy=2(y+2sinx−5)x−2cosx
with the initial condition y(0)=7. Our mission is to determine the value of y(π).
Unmasking the Linear Form
First, we expand the right-hand side of the equation:
dxdy=2xy+4xsinx−10x−2cosx
Next, we rearrange the terms to isolate the linear structure by bringing the y term to the left side:
dxdy−2xy=2x(2sinx−5)−2cosx
This is a classic Linear Differential Equation of the form dxdy+P(x)y=Q(x), where P(x)=−2x and Q(x)=2x(2sinx−5)−2cosx.
The Magic of the Integrating Factor
To solve this, we calculate the Integrating Factor (IF):
Multiplying the entire differential equation by e−x2 allows us to express the left side as a single derivative:
dxd(y⋅e−x2)=e−x2[2x(2sinx−5)−2cosx]
The 'Aha!' Moment
Integrating both sides with respect to x, we obtain:
y⋅e−x2=∫e−x2[2x(2sinx−5)−2cosx]dx+C
By observing the structure of the integrand, we recognize it as the result of the product rule applied to e−x2(5−2sinx). Specifically:
dxd[e−x2(5−2sinx)]=e−x2(−2cosx)+(5−2sinx)e−x2(−2x)
Factoring out e−x2 yields the original integrand. Thus, the integral simplifies to:
The Final Stretch
Multiplying through by ex2 isolates y:
Using the initial condition y(0)=7:
7=5−2sin(0)+Ce0⇒7=5+C⇒C=2
The particular solution is y(x)=5−2sinx+2ex2. Finally, substituting x=π:
Since sin(π)=0, the final result is:
y(π)=2eπ2+5