1st order non homogenous DE problem solving

In summary, the prof wrote that x' = x + sin(t), and 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)) which I verified is correct by substituting. When I try to solve this DE, here's what happens: x = -(1/2)cos(t) + (1/2)sin(t)
  • #1
Somefantastik
230
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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?
 
  • #6
Yes. Then you can apply your boundary conditions to get the final solution.
 
  • #7
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
 
  • #8
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))
 
  • #9
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.
 

1. What is a first-order non-homogenous differential equation?

A first-order non-homogenous differential equation is an equation that involves a function and its first derivative, and also includes a non-zero constant term. This type of equation is used to model many real-world phenomena in areas such as physics, biology, and economics.

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

To solve a first-order non-homogenous differential equation, you can use the method of variation of parameters, which involves finding a particular solution through a series of steps including finding the homogeneous solution, and then using a variation of the original equation to find the particular solution.

3. What is the difference between a homogeneous and a non-homogeneous differential equation?

A homogeneous differential equation is one that does not include a non-zero constant term, whereas a non-homogeneous differential equation does. Homogeneous equations have solutions that are linear combinations of the functions in the equation, while non-homogeneous equations require an additional particular solution.

4. Can you provide an example of a first-order non-homogeneous differential equation?

One example of a first-order non-homogeneous differential equation is y' + 2y = 3x. This equation includes a constant term, 3x, which makes it non-homogeneous. To solve this equation, you would need to find the homogeneous solution, which is y = Ce-2x, and then use the variation of parameters method to find the particular solution.

5. What applications does solving first-order non-homogeneous differential equations have?

Solving first-order non-homogeneous differential equations has many applications in various fields of science and engineering. For example, these equations can be used to model the growth of populations, the spread of diseases, the behavior of electrical circuits, and the dynamics of chemical reactions.

Similar threads

Replies
3
Views
789
  • Differential Equations
Replies
16
Views
889
  • Differential Equations
Replies
7
Views
387
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
748
  • Differential Equations
Replies
5
Views
1K
  • Differential Equations
Replies
6
Views
884
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
1
Views
663
Back
Top