Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Numerical analysis gives wrong result' topicStudent Support Forum > General > Archives > "Numerical analysis gives wrong result"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Hila
01/06/13 09:14am

In Response To 'Re: Numerical analysis gives wrong result'
---------
Thank you so much for taking the time to read my post and answer!!
I am really lost here. I am providing more information and a file (I tried to place only the important information in the file)
I have a profit function, ProfitRetailSolo[L, H, beta, c, ru, R, Ns]. I can solve the first order condition – to get a closed form expression for the value of R that maximizes the profit - only when the parameter Ns is 1.
I need to find the value of R that maximized the profit on the range beta*L, beta*H (that is R is in that range). I am not sure how to provide this restriction to the FindRoot function.
What I ultimately want to find is how the expression CloringR[H,L, Nb,beta, Ns, R,Ra] changes with beta. That is – I want to know if it is increasing or decreasing in beta when evaluated at the optimal value of R.
Ideally- I would find a closed form expression for the optimal value of R (as a function of beta and the other parameters), substitute that expression into ClosingR, and then take derivative of ClosingR with respect to R and examine if it is positive or negative.
Since I don’t have the expression for optimal value of R , I instead do a numerical analysis
I used loops to test 180,000 combinations of parameters value (that is values fo H, L, Nb, beta, Ns) – and for each such combination I numerically want to find the optimal value of R. Then, for each combination of parameter values I find the value of ClsoingR at the optimal R

The problem I have is that with Reduce or find instance, I get the wrong value of the optimal R , and often more than one value (even though clearly there should be only one value ).

You wrote that “You mix exact numbers (integers) with machine precision numbers” . How can I not do this? As you can see the derivative is evaluated within the loops – substituting the values of the parameters.

Any more guidance will be greatly appreciated!!







Attachment: For Forum.nb, URL: ,

Subject (listing for 'Numerical analysis gives wrong result')
Author Date Posted
Numerical analysis gives wrong result Hila 01/04/13 2:44pm
Re: Numerical analysis gives wrong result yehdua 01/05/13 2:07pm
Re: Numerical analysis gives wrong result yehuda 01/05/13 5:38pm
Re: Re: Numerical analysis gives wrong result Hila 01/06/13 09:14am
Re: Re: Re: Numerical analysis gives wrong result yehuda 01/08/13 07:45am
Re: Re: Re: Re: Numerical analysis gives wrong ... Hila 01/12/13 3:39pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic