How to do a Taylor expansion with a matrix
10 views (last 30 days)
Show older comments
I have tried the official matlab website that describes the Taylor expansion, but it doesn't work!
G = [0,4;4,0];
T = taylor(exp(G));
error message "Function 'taylor' (input argument of type 'double') is undefined."
I would like to know the result of infinite convergence separately.
I would be glad if you could tell me!
Accepted Answer
More Answers (2)
KSSV
on 26 May 2023
syms x
f = exp(x)
T = taylor(f)
In place of x substitue each value of G.
0 Comments
John D'Errico
on 26 May 2023
You cannot compute the Taylor series of a constant. You CAN compute a Taylor series, and then evaluate it at that constant value, since the truncated series is then a polynomial.
Will only a few terms from that Taylor series be close to yielding a convergent result? This is something you need to consider, and that is a big part of your homework where you have shown no effort. The eigenvalues of G will be an important factor.
G = [0,4;4,0];
eig(G)
So, given that, will a simple Taylor series for exp(x) converge well for x==4 (or x==-4, for that matter)? How many terms would you expect that to require? Why did I compute the eigenvalues of G here? How are they pertinent?
1 Comment
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!