Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

first order linear differential equation, ZillEx2.5Prob55

Status
Not open for further replies.

PG1995

Active Member
Hi

Please have a look on the attachment and you can find my query there. Please help me with it. I'm much obliged.

Regards
PG
 

Attachments

  • ZillEx2.5Prob55.jpg
    ZillEx2.5Prob55.jpg
    109.8 KB · Views: 255
PG,

For 0 ≤ x ≤ 3, y'+2y=1, so the integrating factor is e^∫2dx = e^2x. That gives y'e^2x+2e^2x = e^2x, or (ye^2x)' = e^2x. Integrating both sides gives ye^2x = e^2x/2 + c or y = ½ + ce^-2x. Substituting the initial conditions gives 0 = ½+c ==> c = -½. So we have y = ½ -½e^-2x for 0 ≤ x ≤ 3.

If x is outside the above range, y'+2y=0, the variables are separable, and the solution is easy.

Question. Did you use Snagit to write your request. If not, what processor did you use.

Ratch
 
PG,

For 0 ≤ x ≤ 3, y'+2y=1, so the integrating factor is e^∫2dx = e^2x. That gives y'e^2x+2e^2x = e^2x, or (ye^2x)' = e^2x. Integrating both sides gives ye^2x = e^2x/2 + c or y = ½ + ce^-2x. Substituting the initial conditions gives 0 = ½+c ==> c = -½. So we have y = ½ -½e^-2x for 0 ≤ x ≤ 3.

If x is outside the above range, y'+2y=0, the variables are separable, and the solution is easy.

Question. Did you use Snagit to write your request. If not, what processor did you use.

Ratch


Hi there Ratch,

In reference to:
"If x is outside the above range, y'+2y=0, the variables are separable, and the solution is easy."

If you dont mind me asking, how are you doing that, and what do you get for a result then?
 
MrAl,

As I understand the problem, if x > 3, then the differential equation is y' + 2y = 0 ==> y' = -2y ===> dy/y = -2dx. Integrating both sides gives ln(y) = -2x + c ===> y = e^-2x+e^c = ce^-2x. The initial condition cannot be applied here because y(0) is not defined for this solution due to x > 3.

Ratch
 
Last edited:
MrAl,

As I understand the problem, if x > 3, then the differential equation is y' + 2y = 0 ==> y' = -2y ===> dy/y = -2xdx. Integrating both sides gives ln(y) = -x² + c ===> y = e^-2x²+e^c = ce^-2x². The initial condition cannot be applied here because y(0) is not defined for this solution due to x > 3.

Ratch

Hi again Ratch,

I was hoping you would notice that we can't apply the initial condition y(0)=0, and i wanted the solution to show exactly how it was done, thanks for that reply.

I think you meant this though:
dy/y=-2*dx
so:
ln(y)=-2*x+c
so:
y=e^(-2*x+c)

Right?

Interestingly, the new initial condition can come from the first equation solved for 0<=x<=3 . Since we solved for y we can set x=3 and get the new initial condition.
If you'd like to try this solution it might be good to see the complete procedure here.
 
Last edited:
MrAl,

I think you meant this though:
dy/y=-2*dx
so:
ln(y)=-2*x+c
so:
y=e^(-2*x+c)

Right?

Not really. y=e^(-2*x+c) has the same form as y = C1*e^-2x, and both solution forms will satisfy the differential equation.

Interestingly, the new initial condition can come from the first equation solved for 0<=x<=3 . Since we solved for y we can set x=3 and get the new initial condition.
If you'd like to try this solution it might be good to see the complete procedure here.

Yes, I thought about that after I submitted the post. That will certainly give continuity to the curve. The equation for both curves will meet at about y=0.5 at x=3. The solution for x>3 will then be y = (½e^6 - ½)*e^-2x

I made a mistake while copying down my work in my previous post. I have corrected it, however.

Ratch
 
Last edited:
Hello again,


Oh, well your original post did not give the correct result that's why i posted the result with the -2x exponent rather than -2x^2, although i thought you meant that anyway, but i was wondering where you could have gotten that -2x^2 from :)

Looks good now. We'll have to wait for PG to reply to see if he figured it out yet.
 
Many thanks, Ratch, MrAl.

I didn't come back to the forums for almost last three days that's why my thanks are little delayed. Yes, I understand it now.

Best regards
PG
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top