Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a matrix that depends on a parameter,call it $\kappa$, and to find the numerical value for $\kappa$ I'm trying to solve det(A($\kappa$) = 0. Of course this is hard to do symbolically, and even when I can get an anayltical result, I think that solving the resulting high order polynomial is giving me incorrect results.

Having said all that, my method of attack is one I learned here, and that is to use the SVD of the matrix, and look for the smallest singular value. Now, everything seems to work, my result should be that $\kappa$ = 2/3. However, when I try "FindRoot" or "FindMinimum" it doesn't work. Here is what I did

g[x_?NumericQ] := Last[SingularValueList[MAT /. \[Kappa] -> x, Tolerance -> 0]]

Plot[g[x], {x, .45, .75}]

enter image description here

Then I tried

In[178]:= FindMinimum[g[x], {x, .65, .70}]
During evaluation of In[178]:= FindMinimum::cvmit: Failed to converge to the     
requested accuracy or precision within 100 iterations. >>

Out[178]= FindMinimum[g[x], {x, 0.65, 0.7}]

And FindRoot results in

In[169]:= FindRoot[g[x], {x, .60, .75}]

Out[169]= {x -> 0.575265}

it great that this gives me an answer, but that root isn't on the graph at all. I even expanded the search down to $x = .45$, even though I know the answer should be 2/3, and there is no root around ".57".

Anyways, I hope I'm not just complaining, but I suppose I am, thanks for bearing with me on this one.

Any help is, as always, great appreciated. Thanks.

1st Edit- Adding MAT

This is probably the dumbest way to show you guys the matrix but here it goes

In[183]:= MAT = {{0.478731, 0.109717, 0, 0, 0., 0., 0., 
0., -0.521269, -0.271722, -0.14164, 0, 0, 0, 0., 0., 0., 0., 0., 
0., 0., 0.}, {0, 0, 0.478731, 0.109717, 0., 0., 0., 0., 0, 0, 
0, -0.521269, -0.271722, -0.14164, 0., 0., 0., 0., 0., 0., 0., 
0.}, {-2.09628, 6, 0, 0, 0, -12., 0, 0, 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0.}, {0, 0, -2.09628, 8, 0, 0, 0, -30., 
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, {4, 0, 0, 
0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 
6, 0, 0, 0, -30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0}, {0, (24 (-88 + 176 \[Kappa] - 44 \[Kappa]^2 - 
55 \[Kappa]^3))/(11 Sqrt[
7]), (24 (20 Sqrt[11] - 30 Sqrt[11] \[Kappa]))/(11 Sqrt[7]), 0,
0, (24 (24 - 44 \[Kappa] - 10 \[Kappa]^2 + 25 \[Kappa]^3))/
Sqrt[7], -((1440 (-2 + 3 \[Kappa]))/Sqrt[77]), 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 
2 Sqrt[3/77] (-2 + 3 \[Kappa]) (400 - 2422 \[Kappa] + 
469 \[Kappa]^2 + 735 \[Kappa]^3), 0, 0, 
0, -30 Sqrt[
3/77] (-2 + 3 \[Kappa]) (92 - 364 \[Kappa] + 49 \[Kappa]^2 + 
343 \[Kappa]^3), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0.,
0., 0., 0., 0., 0., 0., 0., -1., 0, 0, 0, 0, 0, -12., 0, 0, 0, 0, 
0, 0, 0}, {0., 0., 0., 0., 0., 0., 0., 0., 0, 0, 0, -1., 0, 0, 0, 
0, 0, 0, -30., 0, 0, 0}, {0., 0., 0., 0., 0., 0., 0., 
0., -12.9821, -2., 0, 0, 0, 0, 0, -12., 0, 0, 0, 0, 0, 0}, {0., 0.,
0., 0., 0., 0., 0., 0., 0, 0, 0, -12.9821, -2., 0, 0, 0, 0, 0, 
0, -30., 0, 0}, {0., 0., 0., 0., 0., 0., 0., 0., 
126.546, -11.9821, -3., 0, 0, 0, 0, 0, -12., 0, 0, 0, 0, 0}, {0., 
0., 0., 0., 0., 0., 0., 0., 0, 0, 0, 126.546, -11.9821, -3., 0, 0, 
0, 0, 0, 0, -30., 0}, {0., 0., 0., 0., 0.478731, 0.109717, 0, 0, 
0., 0., 0., 0., 0., 0., -1., -0.521269, -0.271722, -0.14164, 0, 0, 
0, 0}, {0., 0., 0., 0., 0, 0, 0.478731, 0.109717, 0., 0., 0., 0., 
0., 0., 0, 0, 0, 0, -1., -0.521269, -0.271722, -0.14164}, {0, 0, 0,
0, 0, 0, 0, 
0, (8 (88 - 198 \[Kappa] + 165 \[Kappa]^2))/(33 Sqrt[7]), 0, 
0, (8 (-20 Sqrt[11] + 30 Sqrt[11] \[Kappa]))/(33 Sqrt[7]), 0, 
0, (32 (8 - 18 \[Kappa] + 15 \[Kappa]^2))/
Sqrt[7], -((8 (8 - 12 \[Kappa] - 18 \[Kappa]^2 + 15 \[Kappa]^3))/
Sqrt[7]), 0, 
0, (8 (480 Sqrt[11] - 720 Sqrt[11] \[Kappa]))/(33 Sqrt[
7]), (8 (-120 Sqrt[11] + 180 Sqrt[11] \[Kappa]))/(33 Sqrt[7]), 
0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 
2/11 Sqrt[
3/7] (-2 + 21 \[Kappa]) (-8 - 10 \[Kappa] + 55 \[Kappa]^2), 0, 
0, -(4/13) Sqrt[
3/77] (-2 + 3 \[Kappa]) (160 - 826 \[Kappa] + 637 \[Kappa]^2), 0,
0, 24/11 Sqrt[
3/7] (-2 + 21 \[Kappa]) (76 - 136 \[Kappa] + 
55 \[Kappa]^2), -(6/11) Sqrt[
3/7] (-2 + 21 \[Kappa]) (-8 + 12 \[Kappa] - 66 \[Kappa]^2 + 
55 \[Kappa]^3), 0, 
0, -(120/13) Sqrt[
3/77] (-2 + 3 \[Kappa]) (82 - 7 \[Kappa] + 637 \[Kappa]^2), 
30/13 Sqrt[
3/77] (-2 + 3 \[Kappa]) (124 - 672 \[Kappa] - 273 \[Kappa]^2 + 
637 \[Kappa]^3), 0, 0}, {0, 0, 0, 0, 0, 0, 0, 
0, (8 (-440 + 792 \[Kappa] + 264 \[Kappa]^2 - 
495 \[Kappa]^3))/(33 Sqrt[
7]), (8 (176 - 396 \[Kappa] + 330 \[Kappa]^2))/(33 Sqrt[7]), 
0, (8 (100 Sqrt[11] - 150 Sqrt[11] \[Kappa]))/(33 Sqrt[
7]), (8 (-40 Sqrt[11] + 60 Sqrt[11] \[Kappa]))/(33 Sqrt[7]), 0,
0, (8 (40 - 84 \[Kappa] + 42 \[Kappa]^2 + 15 \[Kappa]^3))/
Sqrt[7], -((16 (8 - 12 \[Kappa] - 18 \[Kappa]^2 + 15 \[Kappa]^3))/
Sqrt[7]), 0, 
0, (8 (600 Sqrt[11] - 900 Sqrt[11] \[Kappa]))/(33 Sqrt[
7]), (8 (-240 Sqrt[11] + 360 Sqrt[11] \[Kappa]))/(33 Sqrt[7]), 
0}, {0, 0, 0, 0, 0, 0, 0, 
0, -(2/11) Sqrt[
3/7] (-2 + 21 \[Kappa]) (296 - 488 \[Kappa] - 88 \[Kappa]^2 + 
165 \[Kappa]^3), 
4/11 Sqrt[
3/7] (-2 + 21 \[Kappa]) (-8 - 10 \[Kappa] + 55 \[Kappa]^2), 0, 
2/13 Sqrt[
3/77] (-2 + 3 \[Kappa]) (3280 - 21574 \[Kappa] - 
1547 \[Kappa]^2 + 9555 \[Kappa]^3), -(8/13) Sqrt[
3/77] (-2 + 3 \[Kappa]) (160 - 826 \[Kappa] + 637 \[Kappa]^2), 0,
0, 6/11 Sqrt[
3/7] (-2 + 21 \[Kappa]) (296 - 532 \[Kappa] + 154 \[Kappa]^2 + 
55 \[Kappa]^3), -(12/11) Sqrt[
3/7] (-2 + 21 \[Kappa]) (-8 + 12 \[Kappa] - 66 \[Kappa]^2 + 
55 \[Kappa]^3), 0, 
0, -(30/13) Sqrt[3/77] (-2 + 3 \[Kappa]) (452 - 700 \[Kappa] + 2275 \[Kappa]^2 + 
637 \[Kappa]^3), 
60/13 Sqrt[3/77] (-2 + 3 \[Kappa]) (124 - 672 \[Kappa] - 273 \[Kappa]^2 + 
637 \[Kappa]^3), 0}, {0, 0, 0, 0, 0, 0, 0, 0, 
0, (8 (-176 + 330 \[Kappa] + 33 \[Kappa]^2 - 
165 \[Kappa]^3))/(11 Sqrt[
7]), (8 (88 - 198 \[Kappa] + 165 \[Kappa]^2))/(11 Sqrt[7]), 
0, (8 (40 Sqrt[11] - 60 Sqrt[11] \[Kappa]))/(11 Sqrt[
7]), (8 (-20 Sqrt[11] + 30 Sqrt[11] \[Kappa]))/(11 Sqrt[7]), 0,
0, (48 (8 - 16 \[Kappa] + 4 \[Kappa]^2 + 5 \[Kappa]^3))/
Sqrt[7], -((24 (8 - 12 \[Kappa] - 18 \[Kappa]^2 + 15 \[Kappa]^3))/
Sqrt[7]), 0, 0, (8 (240 Sqrt[11] - 360 Sqrt[11] \[Kappa]))/(11 Sqrt[
7]), (8 (-120 Sqrt[11] + 180 Sqrt[11] \[Kappa]))/(11 Sqrt[
7])}, {0, 0, 0, 0, 0, 0, 0, 0, 
0, -(6/11) Sqrt[3/7] (-2 + 21 \[Kappa]) (96 - 166 \[Kappa] - 11 \[Kappa]^2 + 
55 \[Kappa]^3), 
6/11 Sqrt[3/7] (-2 + 21 \[Kappa]) (-8 - 10 \[Kappa] + 55 \[Kappa]^2), 0, 
6/13 Sqrt[3/77] (-2 + 3 \[Kappa]) (1200 - 7742 \[Kappa] - 91 \[Kappa]^2 + 
3185 \[Kappa]^3), -(12/13) Sqrt[
3/77] (-2 + 3 \[Kappa]) (160 - 826 \[Kappa] + 637 \[Kappa]^2), 0,
0, 12/11 Sqrt[3/7] (-2 + 21 \[Kappa]) (144 - 260 \[Kappa] + 44 \[Kappa]^2 + 
55 \[Kappa]^3), -(18/11) Sqrt[
3/7] (-2 + 21 \[Kappa]) (-8 + 12 \[Kappa] - 66 \[Kappa]^2 + 
55 \[Kappa]^3), 0, 
0, -(60/13) Sqrt[3/77] (-2 + 3 \[Kappa]) (288 - 686 \[Kappa] + 1001 \[Kappa]^2 + 
637 \[Kappa]^3), 
90/13 Sqrt[3/77] (-2 + 3 \[Kappa]) (124 - 672 \[Kappa] - 273 \[Kappa]^2 + 
637 \[Kappa]^3)}}
share|improve this question
3  
Please include MAT, or a substitute that demonstrates the same behavior. – Mr.Wizard Aug 22 '12 at 5:06
If you check out this discussion mathematica.stackexchange.com/questions/7551/… and look at "t1" you will see a sample matrix. Thanks – tau1777 Aug 22 '12 at 5:57
@AshikIdrisy Do you mean t2 ? There is no t1. – Artes Aug 22 '12 at 7:49
Since it seems you only want the tiniest singular value, you might consider defining g[] this way: g[x_?NumericQ] := First[SingularValueList[MAT /. κ -> x, -1, Tolerance -> 0]]. – J. M. Aug 22 '12 at 11:43
1  
@Ashik - I assigned the list you added to MAT, and I get a correct result {2.62828*10^-13, {x -> 0.666667}} in Mma 8. I had to fix a few [Kappa]'s in the list though. – stevenvh Aug 22 '12 at 16:04
show 15 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.