1
$\begingroup$

When I compute the the eigenvalues of the matrix $$\begin{bmatrix}x^3& 2 + x^3& 3 - 2 x^3\\ 2 + x^3& 4 - 5 x^3& 5 + 3 x^3\\ 3 - 2 x^3& 5 + 3 x^3& x^3\end{bmatrix}$$ using WolframAlpha, I get the following first eigenvalue (copied from WolframAlpha):

λ_1 = 1/3 (4 - 3 x^3) + 1/3 (-432 x^9 - 1449 x^6 + 810 x^3 + 3 sqrt(3) sqrt(-10664 x^18 + 34200 x^15 - 38845 x^12 - 162020 x^9 - 241908 x^6 + 30520 x^3 - 38808) + 1072)^(1/3) - (-78 x^6 - 18 x^3 - 130)/(3 (-432 x^9 - 1449 x^6 + 810 x^3 + 3 sqrt(3) sqrt(-10664 x^18 + 34200 x^15 - 38845 x^12 - 162020 x^9 - 241908 x^6 + 30520 x^3 - 38808) + 1072)^(1/3))

I want to see the first few terms of the Taylor expansion around x=0 of that expression, however, it seems WolframAlpha cannot handle it. I have been looking for an online Taylor series calculator that can do this but it seems the expression is too hard to crack.

Question: Can anyone share with me a website where I can compute the first few terms (until $x^3$) of the desired Tylor expansion about $x=0$? I do not know how to use programs like Matlab to do this. Do you have any recommendations?

In case it is of any help, here is the expression: $$ \frac{1}{3} (4 - 3 x^3) + \frac{1}{3} (-432 x^9 - 1449 x^6 + 810 x^3 + 3 \sqrt{3} \sqrt{-10664 x^{18} + 34200 x^{15} - 38845 x^{12} - 162020 x^9 - 241908 x^6 + 30520 x^3 - 38808} + 1072)^{1/3} - \frac{(-78 x^6 - 18 x^3 - 130)}{(3 (-432 x^9 - 1449 x^6 + 810 x^3 + 3 \sqrt{3} \sqrt{-10664 x^{18} + 34200 x^{15} - 38845 x^{12} - 162020 x^9 - 241908 x^6 + 30520 x^3 - 38808} + 1072)^{1/3})}$$

$\endgroup$
4
  • $\begingroup$ I don't know of an online tool, but Maxima, which is open source, didn't have a problem with it. See maxima.sourceforge.io $\endgroup$
    – Pseudonym
    Nov 14 at 5:33
  • $\begingroup$ Try sage, a free software computer algebra system. $\endgroup$ Nov 14 at 6:54
  • $\begingroup$ Is this really a question suitable for CS.SE? $\endgroup$
    – Juho
    Nov 14 at 12:28
  • $\begingroup$ Hi @Juho. Do you know a better place to ask this question? $\endgroup$
    – Chilote
    Nov 16 at 0:36
2
$\begingroup$

SageMath can compute Taylor series. It is free software that can be downloaded for free, or it can be used online via CoCalc.

The following code will calculate Taylor series for all three eigenvalues:

M = matrix([[x^3, 2+x^3, 3-2*x^3], [2+x^3, 4-5*x^3, 5+3*x^3], [3-2*x^3, 5+3*x^3, x^3]])     
[taylor(lam,x,0,3) for lam in M.eigenvalues()]                                              

The resulting expressions don't seem too useful. In particular, although the eigenvalues are real, the equations involve complex numbers (possibly an example of casus irreducibilis).

$\endgroup$
1
  • $\begingroup$ That's great! Could you please explain what lam is? I would like to understand how the second line of the code works. What does 0 and 3 stand for in taylor(lam,x,0,3)? Thanks. $\endgroup$
    – Chilote
    Nov 15 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.