I solved the differential equation by eigenvalue​s/eigenvec​tors, how would I solve for the constants from my initial conditions?

6 visualizaciones (últimos 30 días)
syms lambda
A = [-8/3 0 0; 8/3 -8/2 0; 0 8/2 -8/24];
Id3 = sym([1,0,0;0,1,0;0,0,1])
B = lambda*Id3-A
evs = solve(p)
null(evs(1)*Id3-A)
[evctrs,d] = eig(A)
x0 = [3; 7; 6];
lambda_1 = d(1,1);
lambda_2 = d(2,2);
lambda_3 = d(3,3);
vec_1 = evctrs(:,1);
vec_2 = evctrs(:,2);
vec_3 = evctrs(:,3);
syms C1 C2 C3 t
X = C1*vec_1*exp(-lambda_1*t)+C2*vec_2*exp(-lambda_2*t)+C3*vec_3*exp(-lambda_3*t)
% I have initial conditions x1(0)=3, x2(0)=7, and x3(0)=6, but I am not sure how I would equate them to solve for the constants in my equation.

Respuestas (1)

Navya Seelam
Navya Seelam el 9 de Dic. de 2019
Hi,
You can use vpasolve to solve for C1, C2, C3. Try the following
vpasolve(subs(X(1),t,0)==3,C3) % to solve for C3.
Similarly you can solve for C2 and C3.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by