A first order DE

  • Thread starter James889
  • Start date
  • #1
192
1
Hi,

I have the first order differential equation [tex]y+y' = x[/tex]
y(0) = 0
First i tried to assume a solution of the form Ax+b, that didn't quite work.

Then i tried to use the Integrating factor technique, work follows

[tex]e^{\int1} = e^x[/tex]

[tex]\int e^x(y+y') = \int{xe^x}[/tex]

[tex] ye^x = \int xe^x[/tex]

let u = x, du=1
v = e^x dv=e^x

So i end up with:
[tex] ye^x = xe^x -e^x[/tex]

which is wrong...
Any ideas?
 

Answers and Replies

  • #2
258
0
You forgot your " + C" at the end of your integration. : )
 
  • #3
192
1
The answer is supposed to be [tex]y = ce^{-x} + x-1[/tex]

But the answer i get when dividing both sides by e^x is y = x-1
 
Last edited:
  • #4
258
0
Did you read my post?

[tex]e^{\int1} = e^x[/tex]

[tex]\int e^x(y+y') = \int{xe^x}[/tex]

[tex] ye^x = \int xe^x[/tex]

let u = x, du=1
v = e^x dv=e^x

So i end up with:
[tex] ye^x = xe^x -e^x[/tex]

Where is the integration constant? Where is the "+ C"? That is important because when you divide by e^x, you'll end up with the e^(-x) you were looking for.
 
  • #5
vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
15,231
1,831
Hi,

I have the first order differential equation [tex]y+y' = x[/tex]
y(0) = 0
First i tried to assume a solution of the form Ax+b, that didn't quite work.
What didn't work when you did this? Is it the same problem where you're missing the e-x term?
 
  • #6
192
1
What didn't work when you did this? Is it the same problem where you're missing the e-x term?

Yes,

Put y = Ax + b
then y' = A

So i get: Ax + b + A = x
 
  • #7
2,053
319
Yes,

Put y = Ax + b
then y' = A

So i get: Ax + b + A = x

What values of A and b make the left hand side also equal to x?

if y=f(x) is a single solution of the equation y'+y = x the other solutions
are y = f(x) + C g(x) where y= g(x) is a solution of y' + y = 0.
 
  • #8
192
1
What values of A and b make the left hand side also equal to x?
The values A=1, b=-1

But does this mean i have to guess G(x) ?
 
  • #9
vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
15,231
1,831
No, you have to solve the corresponding homogeneous equation y' + y = 0 and add that solution to the other one, yp=x-1, to get the general solution.
 
  • #10
HallsofIvy
Science Advisor
Homework Helper
41,847
966
Hi,

I have the first order differential equation [tex]y+y' = x[/tex]
y(0) = 0
First i tried to assume a solution of the form Ax+b, that didn't quite work.

Then i tried to use the Integrating factor technique, work follows

[tex]e^{\int1} = e^x[/tex]

[tex]\int e^x(y+y') = \int{xe^x}[/tex]

[tex] ye^x = \int xe^x[/tex]

let u = x, du=1
v = e^x dv=e^x

So i end up with:
[tex] ye^x = xe^x -e^x[/tex]

which is wrong...
Any ideas?

You forgot your " + C" at the end of your integration. : )

The answer is supposed to be [tex]y = ce^{-x} + x-1[/tex]

But the answer i get when dividing both sides by e^x is y = x-1
As l'Hopital said, you forgot the "constant of integration", C, in your original solution:
[tex]ye^x= xe^x- e^x+ C[/itex]

Now, dividing through by [itex]e^x[/itex] gives [itex]y= x- 1+ Ce^{-x}[/itex]
 

Related Threads on A first order DE

  • Last Post
Replies
10
Views
1K
  • Last Post
Replies
11
Views
1K
  • Last Post
Replies
17
Views
2K
  • Last Post
Replies
1
Views
999
  • Last Post
Replies
4
Views
860
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
4
Views
1K
Top