1st order non homogenous DE problem solving

  • Context: Undergrad 
  • Thread starter Thread starter Somefantastik
  • Start date Start date
  • Tags Tags
    Problem solving
Click For Summary

Discussion Overview

The discussion revolves around solving a first-order non-homogeneous differential equation of the form x' = x + sin(t) with an initial condition x(0) = x0. Participants explore the solution process, including finding the general solution and addressing discrepancies between their results and a provided solution.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents their attempt to solve the differential equation and questions where they lost the e^(-t) terms in their calculations.
  • Another participant explains the general form of the solution to a non-homogeneous ODE, distinguishing between the homogeneous and particular solutions.
  • A participant expresses confusion about how to apply the initial condition x(0) = x0 to derive the correct final solution.
  • There is a discussion about forgetting constants of integration, which may affect the final solution.
  • One participant suggests that the general solution should include a constant from the homogeneous solution, leading to a revised expression for the general solution.
  • Another participant confirms that the boundary condition should be used to determine the constant in the solution.

Areas of Agreement / Disagreement

Participants generally agree on the method of solving the differential equation but express differing views on the application of initial conditions and the inclusion of constants in their solutions. The discussion remains unresolved regarding the exact form of the final solution.

Contextual Notes

Participants note the importance of constants from indefinite integration and how they affect the final solution. There is also uncertainty about the correct application of initial conditions in determining the constants.

Who May Find This Useful

Readers interested in differential equations, particularly first-order non-homogeneous ODEs, and those seeking clarification on the application of initial conditions and integration constants may find this discussion useful.

Somefantastik
Messages
226
Reaction score
0
In my notes, the prof wrote x' = x + sin(t), x(0) = x0

He did not go through the solution, only wrote that the solution is

x(t,x0) = x0et + et/2 - 1/2(sin(t) + cos(t))

I verified this is correct by substituting.

So when I try to solve this DE, here's what happens:

[tex]{\frac{dx}{dy} \ - \ x = \ sin(t)[/tex]

integrating factor is e-t

[tex]\int \frac{d}{dt} \ (e^{-t}x) = \int e^{-t} \ sin(t) \ dt =>[/tex]

[tex]e^{-t} \ x \ = \ \int e^{-t} \ sin(t) \ dt \ = \ -e^{-t} \ cos(t) \ - \ \int cos(t) \ e^{-t} \ dt \ = \ -e^{-t} \ cos(t) - \left( -e^{-t} \ + \int sin(t) \ e^{-t} \ dt \right)[/tex]

...

[tex]x = -(1/2)cos(t) + (1/2)sin(t)[/tex]

So I'm close, but where did I lose my e-t's ?
 
Physics news on Phys.org
The solution to a non-homogeneous ODE is in the following form:

x = XH + Xsp

Where XH is the general solution to the corresponding homogeneous equation and Xsp is a specific solution to the given non-homogeneous ODE. You have found a specific solution, and you just need to solve the homogeneous equation dx/dt - x = 0 to obtain the XH.
 
Somefantastik said:
In my notes, the prof wrote x' = x + sin(t), x(0) = x0

He did not go through the solution, only wrote that the solution is

x(t,x0) = x0et + et/2 - 1/2(sin(t) + cos(t))

I verified this is correct by substituting.

So when I try to solve this DE, here's what happens:

[tex]{\frac{dx}{dy} \ - \ x = \ sin(t)[/tex]

integrating factor is e-t

[tex]\int \frac{d}{dt} \ (e^{-t}x) = \int e^{-t} \ sin(t) \ dt =>[/tex]

[tex]e^{-t} \ x \ = \ \int e^{-t} \ sin(t) \ dt \ = \ -e^{-t} \ cos(t) \ - \ \int cos(t) \ e^{-t} \ dt \ = \ -e^{-t} \ cos(t) - \left( -e^{-t} \ + \int sin(t) \ e^{-t} \ dt \right)[/tex]

...

[tex]x = -(1/2)cos(t) + (1/2)sin(t)[/tex]

So I'm close, but where did I lose my e-t's ?
You have e-x on both sides of the equation and they cancel out. Specifically, you get e-tx= -(1/2)e-t(cos(t)- sin(t)) by integration, then the "e-t" on each side cancel.
 
I understand they cancel; my question referred to the fact that the prof's answer included e to the POSITIVE t and my answer included no e^t's at all.
 
Ygggdrasil said:
You have found a specific solution, and you just need to solve the homogeneous equation dx/dt - x = 0 to obtain the XH.

so I would solve dx/dt - x = 0 the same way that I solved dx/dt = x + sin(t), and then I should add that result with the particular solution and that is my general solution?
 
Yes. Then you can apply your boundary conditions to get the final solution.
 
Ok so x' = x would have to be x = et.

That gives me x = et - 1/2(sin(t) + cos(t)). It still does not match his final solution of

x(t,x0) = x0et + (1/2)et - 1/2(sin(t) + cos(t))

Any thoughts? I bet that I am misunderstand how to apply x(0) = x0
 
For one thing I've been forgetting those constants from indefinite integration. I think my specific solution should look more like
[tex] x = -(1/2)cos(t) + (1/2)sin(t) + c(1/2) e^{t}[/tex]

so I guess all that's left if helping me figure out how the x0et term got into the final solution:
x(t,x0) = x0et + (1/2)et - 1/2(sin(t) + cos(t))
 
You forgot the constant in the solution to the homogeneous equation:
XH = Aet

Therefore the general solution to the non-homogeneous ODE is:
x(t) = Aet + (1/2)(sin(t)-cos(t))

To find the value for A, you should use the boundary condition x(0) = x0. (You should find that A = x0 + 1/2).


Alternatively, you could carry the constant through your original solution and solve for C using the boundary condition.
 
  • #10
Ok, I got it. Thanks for helping.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K