0
|
15655 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Mathematica won't give me a numerical result

Posted 10 years ago
 Hello everyone, I have a problem with Mathematica 9. For my thesis I have to work with a rather big, but not too complicated equation, but Mathematica just won't give me numerical results for it, even if I assign values to every single variable. Even when I use the N-function, it still won't give me a simple numerical result, but a product containing a square root and some sums. Has anyone else encountered such a problem and does anybody know a solution? Thank you in advance!
6 Replies
Sort By:
Posted 10 years ago
 On a side note, we could let MMa try and simplify the expression, and replace decimals with fractions, i.e. 43.566 with 43566/1000. the result is more compact though not necessarily what you want.we get f[a_, b_] := N[1/(4 Sqrt[14]) Sqrt[((107500 + 21783 a + 18668 b) (224 b + 3 a (70 + 17 b)))/( a b)]] Paul.
Posted 10 years ago
 Ah great. Thank you guys, this actually helps a lot. I'll just remove it then.
Posted 10 years ago
 Hi Daniel,Is there any reason you include the TextCell[""]? removing it then prints a numeric answer. I am suspecting that using TextCell is preserving the format.Paul.
Posted 10 years ago
 TextCell[" "] is the problem. f[a_, b_] := 10 Sqrt[5] \[Sqrt]((215. + 43.566 a + 37.336 b) (0.25 (5/(2 a) + 1500 (1/800 - (-1 + a)/(1000 a)) ) + 0.25 (5/(2 b) + 1250. (1/700 - (-1 + b)/(1000 b)) ))) So f[1,1] yields: 565.986You rule assignment would work for the expression, e.g. f[u, v] /. {u -> 1, v -> 1} 
Posted 10 years ago
 Hi Paul,so this is the equation with all the variables except for a and b. 10 Sqrt[5] \[Sqrt]((215. + 43.566 a + 37.336 b) (0.25 (5/(2 a) + 1500 (1/800 - (-1 + a)/(1000 a)) TextCell[""]) + 0.25 (5/(2 b) + 1250. (1/700 - (-1 + b)/(1000 b)) TextCell[""]))) Now if I set a=1 and b=1 Mathematica gives me this: 384.644 Sqrt[ 0.25 (5/2 + 1.78571 TextCell[""]) + 0.25 (5/2 + (15 TextCell[""])/8)] Using the N-function results in: 384.644 Sqrt[ 0.25 (2.5 + 1.78571 TextCell[""]) + 0.25 (2.5 + 1.875 TextCell[""])] But that doesn't really help me. Do you know where the problem is? Thanks.
Posted 10 years ago
 Hi Daniel, would it be possible for you to post the equation, It is very difficult to give any meaningful answers if we can't see anything.Paul.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.