The given differential equation is a first-order linear form
dxdy+P(x)y=Q(x)
with P(x)=2sec2x and Q(x)=2sec2x+3tanxsec2x.
Step 1: Find the integrating factor (IF).
IF=e∫P(x)dx=e∫2sec2xdx=e2tanx
Step 2: Multiply every term of the differential equation by the IF.
e2tanxdxdy+2sec2xe2tanxy=(2sec2x+3tanxsec2x)e2tanx
The left side is now the derivative of ye2tanx because
dxd(ye2tanx)=e2tanxdxdy+2sec2xe2tanxy.
Therefore,
dxd(ye2tanx)=sec2xe2tanx(2+3tanx).
Step 3: Integrate both sides with respect to x.
∫dxd(ye2tanx)dx=∫sec2xe2tanx(2+3tanx)dx.
Put u=tanx⇒du=sec2xdx to transform the right integral:
∫e2u(2+3u)du.
Break this into two parts:
2∫e2udu+3∫ue2udu.
First integral: 2∫e2udu=2(2e2u)=e2u.
Second integral: use integration by parts, A=u,dB=e2udu.
Then B=2e2u and
∫ue2udu=u2e2u−∫2e2udu=2ue2u−4e2u.
Multiply by the coefficient 3:
3∫ue2udu=23ue2u−43e2u.
Add the two parts:
e2u+(23ue2u−43e2u)=23ue2u+4e2u.
Thus
ye2tanx=23tanxe2tanx+4e2tanx+C,
where C is the constant of integration.
Step 4: Divide by e2tanx to isolate y:
y=23tanx+41+Ce−2tanx.
Step 5: Use the initial condition y(0)=45.
At x=0, tan0=0 and e−2tan0=1, so
45=0+41+C(1)⟹C=1.
Hence the particular solution is
y=23tanx+41+e−2tanx.
Step 6: Evaluate y at x=4π.
tan(4π)=1,e−2tan(π/4)=e−2.
Therefore
y(4π)=23(1)+41+e−2=47+e−2.
Step 7: Compute the required expression:
12(y(4π)−e−2)=12(47+e−2−e−2)=12⋅47=21.
Final answer: 21.