| New Reply |
Mathematica: Eigen problem |
Share Thread | Thread Tools |
| Jun17-12, 03:52 PM | #1 |
|
|
Mathematica: Eigen problem
Hi! I'm having some trouble with this. In the code I define two matrices, then calculate its eigenvalues/eigenvectors, and finally I plot the absolute values of the components of the eigenvectors. The results are consistent with (I'm quite sure) the analytical ones but only below "t approx 30". Above this value, (only) the first plot corresponding to one of the vectors shows some strange behaviour.
Any idea? I've tried to solve it changing the precision options, but I couldn't. Thanks! |
| Jun18-12, 07:10 AM | #2 |
|
|
You should avoid to letting Mathematica works with lots of symbols. Just absorb exponential factor in constant b and redefine it later.
Code:
Clear[a,b,w,g,t]
ρt={{a,b},{b*,1-a}};
{e1,e2}=Eigenvalues[ρt];
{v1,v2}=Eigenvectors[ρt];
Code:
a=0.6`1000;
w=1`1000;
g=1`1000;
b=(1`1000+2`1000*I) Exp[-I*w*t-g*t];
v1n=Normalize[N[v1,1000]];
v2n=Normalize[N[v2,1000]];
Abs1={Abs[v1n[[1]]],Abs[v1n[[2]]]};
Abs2={Abs[v2n[[1]]],Abs[v2n[[2]]]};
|
| Jun18-12, 08:53 AM | #3 |
|
|
Thanks djelovin! It seems that I could fix it doing what you told me and also defining the values of the parameters after the calculations. I'm new to this. Thanks again.
|
| Jun19-12, 12:27 AM | #4 |
|
|
Mathematica: Eigen problem
I believe the underlying problem can be seen if you get rid of all your decimal points and N and attempts to fix this with thousand digit precision and just look at the exact values that you are attempting to calculate with approximate math.
For example, you can see your Abs1 for t==50 has -(E^50)/5+Sqrt[20+(E^100)/25] in both your numerator and denominator. In[1]:= Table[Abs1,{t,50,50}] Out[1]= {{(-E^50/5 + Sqrt[20 + E^100/25])/ (2*Sqrt[5*(1 + (-E^50/5 + Sqrt[20 + E^100/25])^2/20)]), 1/Sqrt[1 + (-E^50/5 + Sqrt[20 + E^100/25])^2/20]}} FabulouslyCloseToZeroButApproximated/ FabulouslyCloseToZeroButApproximated and then throwing this at Plot doesn't seem so surprising when I make tables of those values and see that when t gets large enough that your error bits fall on the wrong side of the scale sometimes. In other words your problem is what I believe I remember they call "ill posed." If I'm remembering the right title, there is a nice little book from about 20 years ago titled "Real Computing Made Real: Preventing Errors In Scientific And Engineering Calculations" that tries to teach how to reformulate ill posed problems so that you get much greater accuracy in the results. Ah! Dover has republished that. I highly recommend that one to anyone pushing bits around. |
| New Reply |
| Thread Tools | |
Similar Threads for: Mathematica: Eigen problem
|
||||
| Thread | Forum | Replies | ||
| Eigen Value, Eigen function -Schrodinger wave equation | Quantum Physics | 1 | ||
| How i find eigen function and eigen value from equation or either | Advanced Physics Homework | 3 | ||
| Need help with deriving the eigen-value and eigen-func for a S-L PDE (1dim Heat EQ) | Differential Equations | 1 | ||
| Eigen vectors and Eigen values | Linear & Abstract Algebra | 6 | ||
| eigen function, eigen value, eigen vector | Quantum Physics | 2 | ||