374 Non-Homogeneous System Example on Mathematica
374 Non-Homogeneous System Example on Mathematica
Solve X' = A X + B with A = and B(t) =
.
8 | -3 |
16 | -8 |
t |
Sin[t] |
A={{8,-3},{16,-8}}
{{8,-3},{16,-8}}
MatrixForm[%]
8 | -3 |
16 | -8 |
Eigenvalues[A]
{-4,4}
Eigenvectors[A]
{{1,4},{3,4}}
Here is the general solution to the homogeneous problem.
X
c
c
1
4t
c
2
-4t
X
c
{{3+},{4+4}}
4t
c
1
-4t
c
2
4t
c
1
-4t
c
2
MatrixForm[[t]]
X
c
3 4t c 1 -4t c 2 |
4 4t c 1 -4t c 2 |
B[t_]:={{},{Sin[t]}}
t
MatrixForm[B[t]]
t |
Sin[t] |
Put two linearly independent solutions and to the homogeneous problem as column vectors in a matrix, . Looking for solutions to the non-homogeneous problem X' = A X + B(t) of the form = (t)+(t)leads to a way to find and .
X
1
X
2
Y={}
X
1
X
2
X
p
b
1
X
1
b
2
X
2
b
1
b
2
MatrixForm[{{3,},{4,4}}]
4t
-4t
4t
-4t
3 4t | -4t |
4 4t | 4 -4t |
MatrixForm[Inverse[%]]
-4t 2 | - 1 8 -4t |
- 4t 2 | 3 4t 8 |
MatrixForm[%.B[t]]
-3t 2 1 8 -4t |
- 5t 2 3 8 4t |
MatrixForm[Integrate[%,t]]
1 408 -4t t |
- 1 680 4t t |
Simplify[%]
(-68+3Cos[t]+12Sin[t]),-(68+15Cos[t]-60Sin[t])
1
408
-4t
t
1
680
4t
t
Here is the solution for and , in the form
.
b
1
b
2
b 1 |
b 2 |
MatrixForm[%]
1 408 -4t t |
- 1 680 4t t |
Here is a particular solution:
X
p
1
408
-4t
t
3 |
4 |
4t
1
680
4t
t
1 |
4 |
-4t
Check that it works!
X
p
X
p
(-68+12Cos[t]-3Sin[t])+(-68+60Cos[t]+15Sin[t])-8(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+3(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t]),(-68+12Cos[t]-3Sin[t])+(-68+60Cos[t]+15Sin[t])-16(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+8(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])
1
136
t
1
680
t
1
136
t
1
680
t
1
102
t
1
170
t
1
102
t
1
170
t
1
136
t
1
680
t
1
102
t
1
170
t
Simplify[%]
{{},{Sin[t]}}
t
Check that the general solution works!
X[t_]:=[t]+[t]
X
c
X
p
X'[t]-A.X[t]-B[t]
-+(-68+12Cos[t]-3Sin[t])+(-68+60Cos[t]+15Sin[t])+12-4-8(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+3++3(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+4+4,(-68+12Cos[t]-3Sin[t])-Sin[t]+(-68+60Cos[t]+15Sin[t])+16-16-16(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+3++8(-68+3Cos[t]+12Sin[t])+(-68-15Cos[t]+60Sin[t])+4+4
t
1
136
t
1
680
t
4t
c
1
-4t
c
2
1
136
t
1
680
t
4t
c
1
-4t
c
2
1
102
t
1
170
t
4t
c
1
-4t
c
2
1
102
t
1
170
t
4t
c
1
-4t
c
2
1
136
t
1
680
t
4t
c
1
-4t
c
2
1
102
t
1
170
t
4t
c
1
-4t
c
2
Simplify[%]
{{0},{0}}