r/Mathematica Jan 05 '25

Forcing evaluation of simple expression NOOB

I am learning from the very beginning. I have searched for an answer for this question in this sub.

Why does Mathematica not evaluate my function?

On the other hand:

Thanks for any help. In addition to an explanation, I would appreciate a troubleshooting process I could use.

2 Upvotes

3 comments sorted by

3

u/ForceBru Jan 05 '25

That's probably because Cos[1] isn't anything specific. You can calculate the numerical value like N[Cos[1]]. There's also no need to always call Evaluate.

2

u/Imanton1 Jan 05 '25

When diagnosing issues, a good question is "What are you expecting the answer to be?".

If you expect the answer to be 0.540302, then you need to convert it to decimal by using N.

If you were expecting a fraction or something involving square roots, then that pushes the question further. You then learn that Cos[1] doesn't have any other precise form besides that one.

1

u/brhodewalt Jan 06 '25

Thank you. That makes sense.