Recent Maths chat.

Page may contain affiliate links. Please see terms for details.

MichaelM

Guru
Location
Tayside
Maths gurus, I'm a bit stuck!


I want to solve the differential equation:

dy/dx=sin(x) + y.tan(x)

Use the integrating factor method I rearrange in the required form of :
dy/dx + g(x)y = h(x) to give dy/dx - tan(x).y = sin(x)

The integrating factor p(x) = exp[Sg(x) dx] where g(x) = -tan(x)
(S represents integration !)

But the integral of tan(x) depends on whether x is negative or positive, and since -pi/2 < x < pi/2 I'm left in a bit of a pickle as to how to proceed! If I use the two integrals for the positive and negative values and integrate between limits things get a bit messy.

Any help would be much appreciated.


Michael

(The final answer for the initial condition y(0)= 1/2 :

y = sec x -1/2 cos x but it's the integrating factor I'm after to get there!)
 

TVC

Guest
Interesting problem Michael.

For those of us who stand no chance of solving this, here is a picture of a kitten:

View attachment 1911
 

marinyork

Resting in suspended Animation
Location
Logopolis
Really, really sorry. Out to a social otherwise I would help. Stick in Maple and see what that says, may offer you a help.
 
OP
OP
M

MichaelM

Guru
Location
Tayside
User3143 said:
Can you not start at the answer and work your backwards?

Not personally I can't, no!

But the general solution before applying the initial conditions is:

y = C sec x -1/2 Cos x if that's of any use!
 

marinyork

Resting in suspended Animation
Location
Logopolis
p(x)=cos(x)
Cos(x).y= Integral of sin(x)cos(x)
Cos(x).y=-1/4(Cos(2x)) +K
y = K.Sec(x) -1/4 Cos(2x)Sec(x)
y=K.Sec(x)-1/4(2Cosx)--1/4(1/cos(x))
y=K.Sec(x)+1/4Sec(x)-1/2Cos(x)
y= K.Sec(x)+1/4Sec(x) -1/2 Cos(x)
y(0)=1/2 yields K to be 3/4
therefore y = sec(x) - 1/2 Cos(x)

Could be complete crap. I've just been down to the pub.
 
OP
OP
M

MichaelM

Guru
Location
Tayside
While you were down the pub, I've been banging my head with this shoot.

marinyork said:
p(x)=cos(x)
Cos(x).y= Integral of sin(x)cos(x)
Cos(x).y=-1/4(Cos(2x)) +K
y = K.Sec(x) -1/4 Cos(2x)Sec(x)

I'm with you up to here.


marinyork said:
y=K.Sec(x)-1/4(2Cosx)--1/4(1/cos(x))

Got me there!

It's late. I've been doing this for too long now. I'm going to bed.
 

marinyork

Resting in suspended Animation
Location
Logopolis
Use the two trigonometric identities Cos(2x)=cos^2(x)-sin^2(x) and 1=sin^2(x)+cos^2(x).
So

Cos(2x)=Cos^2(x)-(1-cos^2(x))
Cos(2x)=2Cos^2(x)-1

So
-1/4(Cos(2x)Sec(x)
=-1/4(2Cos^2(x)-1)sec(x)
=-1/4(2Cos^2(x)-1)/cos(x)
=-1/4(2Cos(x) -1/cos(x)
=-1/4(2Cos(x) +(1/4)Sec(x)

Add this to the rest to get your 3/4Sec(x) +1/4Sec(x) to get Sec(x).
 
Top Bottom