Step 1: Rewrite the differential equation in standard linear form.
The given equation is:
sec(x)dxdy=y+sin(x)
Divide by sec(x) (which is equivalent to multiplying by cos(x)):
dxdy=sec(x)y+sec(x)sin(x)
dxdy=ycos(x)+sin(x)cos(x)
Rearrange into the standard form dxdy+P(x)y=Q(x):
dxdy−cos(x)y=sin(x)cos(x)
Here, P(x)=−cos(x) and Q(x)=sin(x)cos(x).
Step 2: Calculate the integrating factor I(x).
The integrating factor is given by I(x)=e∫P(x)dx.
I(x)=e∫−cos(x)dx
I(x)=e−sin(x)
Step 3: Multiply the standard form equation by the integrating factor.
e−sin(x)(dxdy−cos(x)y)=e−sin(x)(sin(x)cos(x))
The left side of the equation is the derivative of the product y⋅I(x):
dxd(ye−sin(x))=sin(x)cos(x)e−sin(x)
Step 4: Integrate both sides with respect to x.
∫dxd(ye−sin(x))dx=∫sin(x)cos(x)e−sin(x)dx
ye−sin(x)=∫sin(x)cos(x)e−sin(x)dx
To evaluate the integral on the right side, use a substitution. Let u=sin(x), so du=cos(x)dx.
The integral becomes:
∫ue−udu
This integral requires integration by parts, ∫vdw=vw−∫wdv.
Let v=u and dw=e−udu.
Then dv=du and w=−e−u.
∫ue−udu=u(−e−u)−∫(−e−u)du
=−ue−u+∫e−udu
=−ue−u−e−u+C
Factor out −e−u:
=−e−u(u+1)+C
Substitute back u=sin(x):
=−e−sin(x)(sin(x)+1)+C
Step 5: Substitute the result of the integral back into the equation and solve for y.
ye−sin(x)=−e−sin(x)(sin(x)+1)+C
Divide both sides by e−sin(x):
y=−(sin(x)+1)+Cesin(x)
y=Cesin(x)−sin(x)−1
The final answer is y=Cesin(x)−sin(x)−1.