0
$\begingroup$

I have the following matrix:

mat={
{1, 0, 0, 0}, {Cos[0.1 x],Sin[0.1 x], -Cos[0.1 x], -Sin[0.1 x]},
{-100 Cos[0.1 x] -0.05 x^2 Cos[0.1 x] + 100. x Sin[0.1 x],
-100. x Cos[0.1 x] 
-100 Sin[0.1 x] - 0.05 x^2 Sin[0.1 x], -100. x Sin[0.1 x],100. x Cos[0.1 
x]},
 {0, 0, 100 Cos[0.2 x] - 100. x Sin[0.2 x],100. x Cos[0.2 x] + 100 Sin[0.2 
x]}
}

And I want to solve the following system:

Solve[mat.{A1,A2,A3,A4}=={0,0,0,0}]

The trivial solution is that the coefficients are all equal to 0. I want to find the non trivial ones, using Eigenvalues and Eigenvectors won't give me the eigenvalues and eigenvectors due to the complexity of the expressions I think. I can find the eigenvalues by simply finding the determinants:

NSolve[Det[mat] == 0 && (0 <= x <= 100), x]

As for the vectors I have no idea how to do it, if for example I replace x in the matrix by the first eigenvalue and try to solve the system, sometimes I'll get the eigenvector whereas sometimes I'll simply get the trivial solution.

Is there anyway else to find the vectors?

Thanks.

$\endgroup$
3
  • 1
    $\begingroup$ Look up NullSpace $\endgroup$
    – Carl Woll
    Commented Jun 29, 2017 at 12:52
  • $\begingroup$ @CarlWoll It's giving the same issues as NSolve, sometimes it's returning a an empty vector and sometimes the correct one. $\endgroup$
    – Mr. Pi
    Commented Jun 29, 2017 at 12:58
  • $\begingroup$ If you use exact quantities like 1/10 and 1/5 instead of 0.1 and 0.2, do you still get the same problem? $\endgroup$ Commented Jul 30, 2017 at 3:27

1 Answer 1

1
$\begingroup$

First determine the Eigenvalues as you did

nsol = NSolve[Det[mat] == 0 && (0 <= x <= 100), x]

(*   {{x -> 0.}, {x -> 8.7526}, {x -> 23.8999}, {x -> 39.5119}, {x -> 
         55.1807}, {x -> 70.882}, {x -> 86.587}}     *)

Then insert these Eigenvalues in your matrix and NSolve for the corresponding Eigenvektors

ntab = Table[
        NSolve[(mat /. nsol[[i]]).{A1, A2, A3, A4} == {0, 0, 0, 0}, {A1, 
           A2, A3, A4}], {i, Length[nsol]}] // Chop

(*   {{{A1 -> 0, A3 -> 0}}, {{A1 -> 0, A2 -> 0.944859 A4, 
        A3 -> -0.0660616 A4}}, {{A1 -> 0, A2 -> 1.02757 A4, 
        A3 -> -0.0257709 A4}}, {{A1 -> 0, A2 -> 0.977989 A4, 
        A3 -> -0.0231026 A4}}, {{A1 -> 0, A2 -> 1.02337 A4, 
        A3 -> -0.0224421 A4}}, {{A1 -> 0, A2 -> 0.975843 A4, 
        A3 -> -0.0251241 A4}}, {{A1 -> 0, A2 -> 1.02817 A4, 
        A3 -> -0.0271045 A4}}}    *)

You see them here (one or two parameters are free)

{A1, A2, A3, A4} /. ntab

(*   {{{0, A2, 0, A4}}, {{0, 0.944859 A4, -0.0660616 A4, A4}}, {{0, 
        1.02757 A4, -0.0257709 A4, A4}}, {{0, 0.977989 A4, -0.0231026  A4, 
        A4}}, {{0, 1.02337 A4, -0.0224421 A4, A4}}, {{0, 
        0.975843 A4, -0.0251241 A4, A4}}, {{0, 1.02817 A4, -0.0271045 A4, 
       A4}}}    *)

Test the Eigenvektors with the corresponding Eigenvalue

Table[mat.{A1, A2, A3, A4} /. ntab[[i]] /. nsol[[i]], {i, 
       Length[nsol]}] // Simplify // Chop

(*    {{{0, 0, 0, 0}}, {{0, 0, 0, 0}}, {{0, 0, 0, 0}}, {{0, 0, 0, 0}}, {{0, 
        0, 0, 0}}, {{0, 0, 0, 0}}, {{0, 0, 0, 0}}}    *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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