Finding particular solution to 3x3 matrix using undetermined coefficients
Afficher commentaires plus anciens
Hi all,
I am trying to find the particular solution to the following system of equations:
function xprime = A(t,x)
eqn1 = - x(1)*(15/4) == -1575;
eqn2 = (15/4)*x(1) - (5/12)*x(2);
eqn3 = (5/12)*x(2) - (5/14)*x(3);
Below I went about finding my general solution:
end
A = sym([-15/4,0,0;15/4,-5/12,0;0,5/12,-5/14]);
>> Id3 = sym([1,0,0;0,1,0;0,0,1]);
>> syms lambda
>> B = lambda*Id3 - A
B =
[ lambda + 15/4, 0, 0]
[ -15/4, lambda + 5/12, 0]
[ 0, -5/12, lambda + 5/14]
>> p=det(B)
p =
lambda^3 + (95*lambda^2)/21 + (1025*lambda)/336 + 125/224
>> evs = solve(p)
evs =
-15/4
-5/12
-5/14
>> null(evs(1)*Id3-A)
ans =
152/21
-57/7
1
And now, since the system is non-homogenous...this would give me
[0,0,0] = [(-15/4), 0, 0 ; (15/4), (-5/12), 0 ; 0, (5/12) , (-5/14)] x [a1, b1, c1] + [1575, 0, 0]
This results in the numbers that I was looking for.... Xp: 420, 3780, 4410.
My question is...how can I go about this above equation by way of undetermined coefficients in matlab?
Thanks for any advice you have
Réponse acceptée
Plus de réponses (1)
Bruno Luong
le 9 Déc 2018
Guys, this is a linear system, why using FSOLVE?
>> [-15/4 0 0; 15/4 -5/12 0; 0 5/12 -5/14]\[-1575; 0; 0]
ans =
420
3780
4410
>>
1 commentaire
madhan ravi
le 9 Déc 2018
oops you are right ! +1
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!