# Differential equations - exact equations w/ integ factor

The differential equation (e^t)(sec y) - tan y + dy/dt = 0 has an integrating factor (e^-at)(cos y) for some constant a. Find a, and then solve the differential equation.

ANSWER: a=1, y(t) = arc sin [(c-t)e^t]

Attempt:
(e^t)(sec y) - tan y + dy/dt = 0
i multiplied eq'n by integrating factor (e^-at)(cos y)
(e^t)(sec y)(e^-at)(cos y) - tan y(e^-at)(cos y) + (e^-at)(cos y)dy/dt = 0
e^-2at - e^-at sin y + e^-at cos y dy/dt = 0

dM(t,y)/dy = - (e^-at)(cos y)
dN(t,y)/dt = -a (e^-at)(cos y)

set dm(t,y)/dy = dn(t,y)/dt
-(e^-at)(cos y) = -a(e^-at)(cos y)
a = 1 [which is correct.]

.'. the equation is e^-2t - e^-t sin y + e^-t cos y dy/dt = 0

df(t,y)/dt = M(t,y)
df(t,y)/dy = N(t,y)

f(t,y)=integ(M(t,y)dt) + h(y)
f(t,y)=integ(e^-2t - e^-t sin y dy) + h(y)
f(t,y)=-1/2e^-2t - (- e^-t)(sin y) + h(y)
f(t,y)= -1/2e^-2t + e^-t sin y + h(y)

df(t,y)/dy = e^-t cos y + dh(y)/dy
e^-t cos y = e^-t cos y + dh(y)/dy
dh(y)/dy = 0
h(y) = integ(0 dy) + c
h(y) = c

.'. f(t,y) = -1/2e^-2t + e^-t sin y + c
-1/2e^-2t + e^-t sin y = C
-e^-2t + 2e^-t sin y = 2C
2e^-t sin y = 2C+e^-2t
sin y = (2C + e^-2t)/2e^-t
sin y = Ce^t + e^-t
y(t) = arc sin [Ce^t + e^-t]
C1 = Ce^t
y(t) = arc sin [C1 + e^-t]

i cannot get the answer given..
what have i done wrong

$$\frac{e^{t}}{\cos y}-\tan y+\frac{dy}{dt}=0 \ \left\right| e^{-t}\cos y$$

$$1-e^{-t}\sin y +e^{-t}\cos y \frac{dy}{dt} =0$$

$$1-e^{-t}\sin y +\frac{d}{dt}\left(e^{-t}\sin y\right)+e^{-t}\sin y=0$$

$$\frac{d}{dt}\left(e^{-t}\sin y\right) =-1$$

$$e^{-t}\sin y =-t+C$$

$$y=\arcsin\left(-te^t +Ce^t\right)$$

Your mistake was not going back to the original differential equation which was etsec y - tan y + dy/dt = 0. Since sec y= 1/cos y and tan y= sin y/cos y, once you multiply by e-t[/sup cos y, that equation becomes 1- e-tsin y + e-tcos y dy/dt= 0 or, in differential form,
(1- e-tsin y)dt+ e-tcos y dy= 0