We start from the given differential equation
dxdy=2(y+2sinx−5)x−2cosx.
The bracketed expression y+2sinx−5 occurs as a whole, so it is natural to set
u=y+2sinx−5.
Using the chain rule, the derivative of u with respect to x is
dxdu=dxdy+2cosx,
because dxd(2sinx)=2cosx and the derivative of the constant −5 is zero.
Now we substitute the given value of dxdy into this expression. From the differential equation we have
dxdy=2x(y+2sinx−5)−2cosx=2xu−2cosx.
Therefore
dxdu=(2xu−2cosx)+2cosx=2xu.
We have arrived at the much simpler separable equation
dxdu=2xu.
Re-arranging,
u1du=2xdx.
We integrate both sides:
∫u1du=∫2xdx.
That gives
ln∣u∣=x2+C,
where C is the constant of integration. Exponentiating both sides we get
u=Cex2.
Substituting back u=y+2sinx−5, we obtain
y+2sinx−5=Cex2,
so
y=Cex2−2sinx+5.
To evaluate the constant C we use the initial condition y(0)=7. At x=0 we have sin0=0, hence
7=Ce0−2sin0+5=C⋅1−0+5=C+5.
Therefore
C=7−5=2.
Thus the explicit solution is
y(x)=2ex2−2sinx+5.
Now we need y(π). Because sinπ=0, we get
y(π)=2eπ2−2⋅0+5=2eπ2+5.
Hence, the correct answer is Option C.