Solution:
Key idea: A first-order linear equation can be written as dxdy+Py=Q, where P and Q are functions of x only. Its integrating factor is IF=e∫Pdx. Multiplying the equation by the IF turns the left side into dxd(y⋅IF), so the solution is y⋅IF=∫Q⋅IFdx+c, where c is the arbitrary constant. In each part we find the general solution first and then use the given values to fix c.
Step 1 — Part (i): find the IF.
Here P=−3cotx. Near the given point sinx>0, so its integral is −3logsinx.
IF=sin3x1
Step 2 — Part (i): solve.
We multiply Q=sin2x=2sinxcosx by the IF.
sin3xy=∫sin2x2cosxdx
With u=sinx the integral is ∫u22du=−u2.
sin3xy=−sinx2+c
y=−2sin2x+csin3x
Step 3 — Part (i): use the given values.
We are told that y is 2 when x is 2π, where sinx is 1.
2=−2+c
c=4
Step 4 — Part (ii): find the IF.
Here P=2tanx. On −2π<x<2π its integral is 2logsecx.
IF=sec2x
Step 5 — Part (ii): solve.
We multiply Q=sinx by sec2x; this is secxtanx.
ysec2x=∫secxtanxdx
ysec2x=secx+c
Multiplying by cos2x gives y.
y=cosx+ccos2x
Step 6 — Part (ii): use the given values.
We are told that y is 0 when x is 3π, where cosx is 21.
0=21+4c
c=−2
Step 7 — Part (iii): find the IF.
This equation is already linear in x, with P=coty. Near y=2π, siny>0, so its integral is logsiny.
IF=siny
Step 8 — Part (iii): solve.
We multiply Q by siny; the integrand is exactly dyd(y2siny) by the product rule.
xsiny=∫(2ysiny+y2cosy)dy
xsiny=y2siny+c
Step 9 — Part (iii): use the given values.
We are told that x is 0 when y is 2π, where siny is 1.
0=4π2+c
c=−4π2
Step 10 — Part (iv): find the IF and solve.
We divide by x (taking x>0); then P=x1 and the IF is x.
xy=∫(xcosx+sinx)dx
The integrand is dxd(xsinx) by the product rule.
xy=xsinx+c
Step 11 — Part (iv): use the given values.
We are told that y is 1 when x is 2π.
2π=2π+c
c=0
So xy equals xsinx, and dividing by x gives y=sinx.
Step 12 — Part (v): find the IF.
We divide by sinx (on 0<x<π).
dxdy−cosecx⋅y=tan2x
We use ∫cosecxdx=logtan2x (here tan2x>0).
IF=cot2x
Step 13 — Part (v): solve.
Multiplying Q=tan2x by cot2x gives 1.
ycot2x=∫1dx
ycot2x=x+c
Step 14 — Part (vi): linear form in x.
We divide by yeydy to get dydx and collect the x term.
dydx−y2x=y2e−y
Here P=−y2, so (for y>0) the IF is e−2logy.
IF=y21
Step 15 — Part (vi): solve.
Multiplying Q by y21 leaves e−y.
y2x=∫e−ydy
y2x=−e−y+c
Step 16 — Part (vi): use the given values.
We are told that x is 0 when y is 1.
0=−e−1+c
c=e−1
Therefore, (i) y=4sin3x−2sin2x; (ii) y=cosx−2cos2x; (iii) xsiny=y2siny−4π2; (iv) y=sinx; (v) ycot2x=x+c; (vi) x=y2(e−1−e−y).