Results 1 to 10 of 10

Math Help - Reduce Precision in Mathematica

  1. #1
    Newbie
    Joined
    Feb 2011
    Posts
    9

    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!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    What is your equation?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2011
    Posts
    9
    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!


    Reduce Precision in Mathematica-pispic.jpg
    Follow Math Help Forum on Facebook and Google+

  4. #4
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    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!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Feb 2011
    Posts
    9
    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.

    Matt PIAS Multilayer - notebook.pdf
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    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?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Feb 2011
    Posts
    9
    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"

    Matt+PIAS+Multilayer_player.pdf
    Follow Math Help Forum on Facebook and Google+

  8. #8
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    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.

    Sorry about that.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Feb 2011
    Posts
    9
    Thanks so much for all your help. I wouldn't even think of asking you to retype all of that information.

    Just off hand though, you don't know any way to control the decimal place of the convergence criteria other than AccuracyGoal and PrecisionGoal? They both want convergence at <1 and I really only need the accuracy to be around 10^7.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Not off-hand, no. The only suggestion I have is to look at the extensive Mathematica help for whatever functions you're trying to use. They will tell you what optional arguments you can pass in to control how the functions work.

    Cheers.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Finite Precision?
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: October 20th 2010, 03:54 PM
  2. finding the degree of precision
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: March 2nd 2010, 12:24 AM
  3. double precision
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: September 18th 2009, 11:44 PM
  4. Precision of estimator
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: August 17th 2009, 01:54 PM
  5. Measure and Precision
    Posted in the Geometry Forum
    Replies: 2
    Last Post: August 29th 2007, 03:31 PM

Search Tags


/mathhelpforum @mathhelpforum