# Reduce Precision in Mathematica

Printable View

• March 16th 2011, 08:39 AM
mattfred
Reduce Precision in Mathematica
I've spent quite a bit of time searching for an answer to my problem, but one of the main problems is that I don't exactly know how to phrase it correctly.

I have an equation in two variable that I want to find the roots in one variable (E) as a function of the other(r). I can plot f(E) with a known r relatively fast, but I cannot find the roots at all. I've tried Solve, FindRoot, and FindInstance with various accuracy and precision goals and damping factors. I think one of the main problems is that the numbers involved are quite large. I only care about two or three sig figs, but even at the lowest precision, mathematica wants the accuracy to be to the right of the decimal place, which gives about 15 significant figures. I also think there is a small imaginary component to the solution that I don't care about, but may be preventing the calculation from converging.

Basically, I want a rough, fast estimate of the zeros. I could do it by hand, but it seems to me that if the computer can plot the function as rapidly as it does, I should be able to set the tolerances where I want and get an idea of where the zero is.

Thanks!
• March 16th 2011, 08:46 AM
Ackbeet
• March 16th 2011, 10:13 AM
mattfred
1 Attachment(s)
I've attached a screenshot of the input. I don't really know how tractable it will be to see the input. Every variable except Eh and r is a defined constant.

I never took a course in linear algebra, so I don't really know much about the matrix operations. The problem is initially solving for the coefficients of $\psi$ (line 45) with a certain set of boundary conditions. I'm positive that that is all handled correctly as when I evaluate Ehole with the proper r and Eh I get the values I expect.

I can easily plot the argument in Ehole. I just want to relax the convergence criteria so that I can rapidly model Ehole as a function of R for various changes in the other input parameters.

Thanks!

Attachment 21162
• March 17th 2011, 07:06 AM
Ackbeet
Hmm. That's extraordinarily complicated. Could you please send me the Mathematica notebook that has all that? I'm going to have to play around a bit in order to make anything of it. If MHF balks at uploading the file, just change the extension to pdf or jpg or something like that. Thanks!
• March 17th 2011, 08:07 AM
mattfred
1 Attachment(s)
Haha yeah it is quite complicated. I posted about solving the system earlier:

http://www.mathhelpforum.com/math-he...tml#post621430

but eventually got help from a colleague. Everything up until "Determination of Energy" is definitions of constants and solving for the coefficients with the appropriate boundary conditions. I'm certain that that portion is handled correctly.

Attachment 21171
• March 17th 2011, 08:17 AM
Ackbeet
Well, I tried opening the file, but I have Mathematica 4, not 7. Is there any way you can save the notebook in a backwards-compatible way?
• March 17th 2011, 10:19 AM
mattfred
1 Attachment(s)
The best option I can come up with is converting to Mathematica Player. It's a free download and claims that it retains all the features of Mathematica with certain licensing agreements that I believe this fails under:

Wolfram Mathematica Player: Free Interactive Player for Mathematica Notebook Documents

When I open the file, it looks indistinguishable to me. You'll have to change the file extension to ".nbp"

Attachment 21174
• March 19th 2011, 04:13 PM
Ackbeet
I hate to break it to you, but I don't think I'm going to be of much help here. In order for me to really do anything useful, I need to be able to evaluate cells and play around. I successfully installed the Wolfram software you linked to, but it doesn't let me edit or even evaluate cells (unless I'm missing something).

I could try to type out the file in Mathematica 4 format, but that seems like an enormous amount of work.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 1, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9507363438606262, "perplexity_flag": "middle"}