I solved the differential equation by eigenvalues/eigenvectors, how would I solve for the constants from my initial conditions?
조회 수: 4 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Navya Seelam
2019년 12월 9일
Hi,
vpasolve(subs(X(1),t,0)==3,C3) % to solve for C3.
Similarly you can solve for C2 and C3.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!