0
|
6461 Views
|
11 Replies
|
2 Total Likes
View groups...
Share
GROUPS:

# Distributed parameter beam system: determine natural frequencies

Posted 11 years ago
 Hi,I am working on a method to evaluate a distributed parameter beam system to determine its natural frequencies.  To do so, I need to find the exponential matrix of a six by six symbolic matrix, and then integrate the individual entries using the symbol as the variable from 0 to 1.So I start with this matrix:bigPhis = {{0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0,     0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, {c1, 0, c2, 0,     alpha^2, 0}};where c1 is a complex number, and c2 and alpha are both real.  I am able to get the exponential matrix output (point for Mathematica over Matlab!) usingbigPsixs = MatrixExp[bigPhis*(x - xo)]where x is a symbol and xo is a value of 0.5.  I take the first entry of this matrix, which gives me an output that starts like this:{RootSum[(8.29521*10^6 -       55.5556 I) - (9.95425*10^7 - 666.667 I) x + (4.97712*10^8 -        3333.33 I) x^2 - (1.32723*10^9 -        8888.89 I) x^3 + (1.99085*10^9 -        13333.3 I) x^4 - (1.59268*10^9 -        10666.7 I) x^5 + (5.30893*10^8 - 3555.56 I) x^6 -     331809. #1^2 + 3.98171*10^6 x #1^2 - 1.99086*10^7 x^2 #1^2 +     5.30895*10^7 x^3 #1^2 - 7.96342*10^7 x^4 #1^2 + ... ...  ... (continues)So I have read the articles about #1 being a placeholder for the first root solution, which I kind of sort of understand, but the next step for this problem is:om11 = Integrate[Exp[alpha*(x - xo)]*bigPsixs[[1, 1]], {x, 0, xo}] +  Integrate[Exp[alpha*(xo - x)]*bigPsixs[[1, 1]], {x, xo, 1}];So you can see that I still need x in the bigPsixs input to be able to integrate it.  Does anyone have any tips or ideas of how to make this work?  I don't really know how to solve for #1 numerically and still keep x in the equation for the next step integration, but maybe I am confused on the Mathematica output... please help?Thanks,Kaitlin
11 Replies
Sort By:
Posted 11 years ago
 The symbol name fell out of "the symbol as the variable".
Posted 11 years ago
 Sorry, I am not quite sure what you mean- "the symbol as the variable" is x- is that what you are referring to?  Why or how would a variable "fall out" and how can I fix it?
Posted 11 years ago
 In[1]:= bigPhis = {{0,1,0,0,0,0}, {0,0,1,0,0,0}, {0,0,0,1,0,0}, {0,0,0,0,1,0}, {0,0,0,0,0,1}, {c1,0,c2,0,alpha^2,0}};bigPsixs = MatrixExp[bigPhis*(x - xo)];ToRadicals[bigPsixs[[1]]]Out[3]= ...huge output with x snipped, perhaps with your coefficients it will be smaller, perhaps Simplify may help
Posted 11 years ago
 I like the ToRadicals idea, but I don't think it worked- here is what I got from "testy=ToRadicals[bigPsixs[[1,1]]" (I only need one entry at a time, so I changed [[1]] to [[1,1]]).I still end up with #1 in the output... RootSum[(0.0801746 -      0.00555556 I) - (0.962095 - 0.0666667 I) x + (4.81047 -       0.333333 I) x^2 - (12.8279 - 0.888889 I) x^3 + (19.2419 -       1.33333 I) x^4 - (15.3935 - 1.06667 I) x^5 + (5.13117 -       0.355556 I) x^6 - 331809. #1^2 + 2.65447*10^6 x #1^2 -    7.96342*10^6 x^2 #1^2 + 1.06179*10^7 x^3 #1^2 -    5.30895*10^6 x^4 #1^2 - 2.5*10^-7 #1^4 + 1.*10^-6 x #1^4 -    1.*10^-6 x^2 #1^4 +    1. #1^6 &, ((0. + 0. I) - 331809. E^#1 #1 +     2.65447*10^6 E^#1 x #1 - 7.96342*10^6 E^#1 x^2 #1 +     1.06179*10^7 E^#1 x^3 #1 - 5.30895*10^6 E^#1 x^4 #1 -     2.5*10^-7 E^#1 #1^3 + 1.*10^-6 E^#1 x #1^3 -     1.*10^-6 E^#1 x^2 #1^3 + E^#1 #1^5)/(-663619. #1 +     5.30895*10^6 x #1 - 1.59268*10^7 x^2 #1 + 2.12358*10^7 x^3 #1 -     1.06179*10^7 x^4 #1 - 1.*10^-6 #1^3 + 4.*10^-6 x #1^3 -     4.*10^-6 x^2 #1^3 + 6. #1^5) &]The coefficients for the code arec1=-5.13117 + 0.355556 Ic2=5.30895*10^6alpha=0.001if you want to play with it using those.  Likely to be no reduction in the output, sorry!  Anyone have ideas on how to eliminate/solve #1 so that I have all of the output in terms of x???
Posted 11 years ago
 Dear Kaitlin, please take a few minutes to read this tutorial about correct posting  especially of Mathematica code:How to type up a post: editor tutorial & general tipsIf you will not follow the tutorial, other members of community may not be able to test your code. To edit your post  click Edit in the lower right corner of your post.
Posted 11 years ago
 c1 = -5.13117 + 0.355556 I;c2 = 5.30895*10^6;alpha = 0.001;ToRadicals[Normal[RootSum[...]]]with or without an N[] wrapped around the ToRadicals seems to eliminate the #1 and give you the x you desire..The use of Normal is described in the help page for RootSum hidden under Details
Posted 11 years ago
 Interesting... that does seem to be an improvement, but is <<1>> that I see in the output still a root solution?  I am trying to get to a point of being able to evaluate this:om11 = Integrate[   Exp[0.001*(x - 0.5)]*ToRadicals[Normal[bigPsixs[[1, 1]]]], {x, 0,    0.05}] + Integrate[   Exp[0.001*(0.5 - x)]*ToRadicals[Normal[bigPsixs[[1, 1]]]], {x, 0.05,    1}]where the bigPsixs matrix is:bigPhis = {{0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0,    0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, {-5.13117 + 0.355556 I, 0, 5.30895*10^6, 0,    0.001^2, 0}};bigPsixs = MatrixExp[bigPhis*(x - 0.5)];When I try to evaluate even just the first element of bigPsixs by itself, it just runs and runs- whether I use N[ or not.  I had initially assumed it couldn't calculate the integral because I had the #1 terms in the bigPsixs expression, which now seem to be replaced with <> values.  How do I know whether the integration isn't completing because it is computationally intensive or whether it isn't completing because there is a problem with the bigPsixs output?  I am fairly new to Mathamatica, so I don't know how to deal with nasty math very well...Integrate[ToRadicals[Normal[bigPsixs[[1, 1]]]], {x, 0, 1}]Integrate[N[ToRadicals[Normal[bigPsixs[[1, 1]]]]], {x, 0, 1}]Thank you for your help!
Posted 11 years ago
 Probably better to use NIntegrate for this. Alternatively, use exact values everywhere and doIntegrate[Exp[1/1000*(x - 1/2)]*bigPsixs[[1, 1]], {x, 0, 5/100}];It seems much faster to avoid the ToRadicals[...] stuff.
Posted 11 years ago