• Support PF! Buy your school textbooks, materials and every day products Here!

Solving a linear ODE

  • #1

Homework Statement



Solve 2*dy/dx - y = e^x at y(0) = 0

The Attempt at a Solution



So the integrating factor is e^-x

Multiplying through by e^-x:

2e^-x(dy/dx) - ye^-x = 1

Now this is where I'm having a slight problem, isn't the left hand side meant to contract via the product rule to d/dx(...) ?

Except that the derivative of 2e^-x is not -e^-x

What have I done wrong?
 

Answers and Replies

  • #2
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,622
6

Homework Statement



Solve 2*dy/dx - y = e^x at y(0) = 0

The Attempt at a Solution



So the integrating factor is e^-x

Multiplying through by e^-x:

2e^-x(dy/dx) - ye^-x = 1

Now this is where I'm having a slight problem, isn't the left hand side meant to contract via the product rule to d/dx(...) ?

Except that the derivative of 2e^-x is not -e^-x

What have I done wrong?
You might want to check your integrating factor :wink:
 
  • #3
dynamicsolo
Homework Helper
1,648
4
The form of the differential equation needed before computing an integrating factor is
y' + P(x)y = Q(x). This is done so the Product Rule can be applied: you are looking for a function I(x) such that

[tex]I(x) \frac{dy}{dx} + I(x)P(x)y = I(x)Q(x) \Rightarrow \frac{d}{dx}[I(x)y(x)] = I(x)Q(x) ,[/tex]

that is, so you will be able to re-make the left-hand side of the differential equation into the derivative of a simple product. After integration, you will have [itex]I(x)y(x) = \int I(x)Q(x) [/itex], after which you can simply divide I(x) back out again to obtain an expression for y (one that has a "closed form" if I(x)Q(x) can be integrated).
 
  • #4
HallsofIvy
Science Advisor
Homework Helper
41,833
955

Homework Statement



Solve 2*dy/dx - y = e^x at y(0) = 0

The Attempt at a Solution



So the integrating factor is e^-x

Multiplying through by e^-x:

2e^-x(dy/dx) - ye^-x = 1

Now this is where I'm having a slight problem, isn't the left hand side meant to contract via the product rule to d/dx(...) ?

Except that the derivative of 2e^-x is not -e^-x
Then you must have the wrong integrating factor since this is exactly how "integrating factor" is defined!

What have I done wrong?
 
  • #5
Ah...I see now, I should divide the equation through by 2 first, therefore the integrating factor becomes e^-1/2x

and the equation eventually becomes y = e^x + e^-1/2x

Thanks guys =)
 
  • #6
dynamicsolo
Homework Helper
1,648
4
...
and the equation eventually becomes y = e^x + e^-1/2x
Not quite: check what you did when you divided e-(1/2)x back out. Your solution doesn't work in the original DE...
 
Last edited:

Related Threads on Solving a linear ODE

  • Last Post
Replies
1
Views
746
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
6
Views
1K
Replies
5
Views
1K
Replies
14
Views
717
Replies
3
Views
1K
Replies
7
Views
914
Top