hw4: corrected 2, done 1 and 2

This commit is contained in:
Claudio Maggioni 2021-05-26 12:00:01 +02:00
parent fd5ce90894
commit 6f07bf149c
3 changed files with 8 additions and 9 deletions

View file

@ -67,8 +67,8 @@ $$c(x) = \left( \frac{1}{3+\lambda} \right)^2 + \left( -\frac{1}{1-\lambda} \rig
(\lambda^4 - 6\lambda^3 + 13\lambda^2 - 12\lambda + 16) +
(\lambda^4 + 2\lambda^3 - 11\lambda^2 - 12\lambda + 36) +
(\lambda^4 + 4\lambda^3 - 2\lambda^2 - 12\lambda + 9)$$$$
+ (-\lambda^5 -14\lambda^4 +12\lambda^3 +49\lambda^2 -84\lambda + 36) = $$$$
=-\lambda^5 +17\lambda^4 -12\lambda^3 -49\lambda^2 +48\lambda +13 = 0
+ (\lambda^6 -14\lambda^4 +12\lambda^3 +49\lambda^2 -84\lambda + 36) = $$$$
=-\lambda^6 +17\lambda^4 -12\lambda^3 -49\lambda^2 +48\lambda +13 = 0
\Leftrightarrow $$$$ \Leftrightarrow
\lambda = \lambda_1 \approx -0.224 \lor
\lambda = \lambda_2 \approx -1.892 \lor

View file

@ -1,8 +1,7 @@
clc
syms l
X = [1/(3+l); (-1)/(1-l); (-1)/(2-l)]
syms l
a1 = (3+l)^2;
a2 = (1-l)^2;
a3 = (2-l)^2;
@ -12,12 +11,12 @@ t2 = a1*a3
t3 = a1*a2
t4 = a1*a2*a3
c1 = fliplr(coeffs(t1))
c2 = fliplr(coeffs(t2))
c3 = fliplr(coeffs(t3))
c4 = fliplr(coeffs(t4))
c1 = (coeffs(t1, 'All'))
c2 = (coeffs(t2, 'All'))
c3 = (coeffs(t3, 'All'))
c4 = (coeffs(t4, 'All'))
ctot = fliplr(coeffs(t1+t2+t3-t4))
ctot = coeffs(t1+t2+t3-t4, 'All')
sol = double(solve(t1+t2+t3-t4==0, l, 'Real', true))