We start from the given differential equation
xy′−y=x2(xcosx+sinx),x>0.
Because a factor of x is multiplying y′, we first divide the whole equation by x (allowed since x>0) so that the derivative term stands alone:
y′−x1y=x2cosx+xsinx.
This is a first-order linear differential equation of the standard form
y′+P(x)y=Q(x),
with
P(x)=−x1,Q(x)=x2cosx+xsinx.
The integrating factor is obtained from the formula μ(x)=e∫P(x)dx. Hence
μ(x)=exp(∫−x1dx)=exp(−lnx)=x−1.
Multiplying every term of the differential equation by this integrating factor x−1 gives
x−1y′−x−2y=x−1(x2cosx+xsinx)=xcosx+sinx.
By construction the left-hand side is the exact derivative of μ(x)y=x−1y:
dxd(x−1y)=xcosx+sinx.
We now integrate both sides with respect to x:
x−1y=∫(xcosx+sinx)dx+C.
We evaluate the integral term by term.
First, for ∫xcosxdx we apply integration by parts:
Let u=x⇒du=dx,
and dv=cosxdx⇒v=sinx. Then
∫xcosxdx=xsinx−∫sinxdx=xsinx+cosx.
Second, ∫sinxdx=−cosx.
Adding the two results, the sum of the integrals is simply
xsinx+cosx+(−cosx)=xsinx.
Thus we have
x−1y=xsinx+C.
Multiplying through by x gives the explicit solution
y(x)=x2sinx+Cx.
We next use the initial condition y(π)=π to find the constant C:
π=y(π)=π2sinπ+Cπ=0+Cπ,
so C=1. Substituting this back, our solution becomes
y(x)=x2sinx+x.
Now we need y′′(2π)+y(2π). To do this we first differentiate y(x) twice.
The first derivative :
y′(x)=dxd(x2sinx+x)=2xsinx+x2cosx+1.
The second derivative :
y′′(x)=dxd(2xsinx+x2cosx+1)=2sinx+2xcosx+2xcosx−x2sinx=2sinx+4xcosx−x2sinx.
We now evaluate these expressions at x=2π.
Noting that sin(2π)=1 and cos(2π)=0, we have
y′′(2π)=2⋅1+4⋅2π⋅0−(2π)2⋅1=2−4π2.
Similarly,
y(2π)=(2π)2⋅1+2π=4π2+2π.
Adding these two values gives
y′′(2π)+y(2π)=(2−4π2)+(4π2+2π)=2+2π.
Hence, the correct answer is Option A.