Solve 1st Order DE: y+y'=x, y(0)=0

  • Thread starter James889
  • Start date
  • Tags
    First order
C is an arbitrary constant.In summary, the conversation discusses solving a first order differential equation using the integrating factor technique. The original solution was missing a constant of integration, resulting in an incorrect answer. The correct answer is y = ce^-x + x - 1, where c is an arbitrary constant.
  • #1
James889
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?
 
Physics news on Phys.org
  • #2
You forgot your " + C" at the end of your integration. : )
 
  • #3
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
Did you read my post?

James889 said:
[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
James889 said:
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
vela said:
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
James889 said:
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
willem2 said:
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
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
James889 said:
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?

l'Hôpital said:
You forgot your " + C" at the end of your integration. : )

James889 said:
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]
 

1. What is a first-order differential equation?

A first-order differential equation is an equation that involves the first derivative of a function. It can be written in the form of y' = f(x,y), where y' is the first derivative of y with respect to x, and f(x,y) is a function of x and y.

2. How do you solve a first-order differential equation?

To solve a first-order differential equation, you need to find a function that satisfies the equation. This can be done by using various methods, such as separation of variables, integrating factors, or using a substitution.

3. What is the specific solution to y+y'=x?

The specific solution to y+y'=x is y = (1/2)x^2 + C, where C is a constant. This can be found by integrating both sides of the equation with respect to x and applying the initial condition y(0)=0.

4. How do you apply the initial condition to a first-order differential equation?

To apply the initial condition to a first-order differential equation, you substitute the given values into the general solution and solve for the constant C. In this case, y(0)=0 gives the value of C as 0.

5. What is the significance of the initial condition in solving a first-order differential equation?

The initial condition is important because it allows us to find the specific solution to a first-order differential equation. It provides a starting point for finding the constant C and helps us to determine a unique solution to the equation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
685
  • Calculus and Beyond Homework Help
Replies
2
Views
275
  • Calculus and Beyond Homework Help
Replies
8
Views
761
  • Calculus and Beyond Homework Help
Replies
19
Views
774
  • Calculus and Beyond Homework Help
Replies
3
Views
851
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
706
  • Calculus and Beyond Homework Help
Replies
5
Views
286
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Back
Top