Student Support Forum: 'under and overflow occuring with FindMaximum' topicStudent Support Forum > General > "under and overflow occuring with FindMaximum"

 Next Comment > Help | Reply To Topic
 Author Comment/Response igor 07/05/12 09:13am Hi, When trying to find the maximum of a function Mathematica returns a combined under- and overflow error. Here is a simplified version of my problem. Hopefully the problem itself will be solveable when understanding this version. In[313]:= FindMaximum[{If[b0 == b1, E^(-((m0^2 + m0 m1 + m1^2 - 3 m0 x - 3 m1 x + 3 x^2)/(6 b1^2)))/( b1 Sqrt[2 \[Pi]]), 1/Sqrt[2 \[Pi]] b0^(-(b0^2/(b0^2 - b1^2))) (b0/ b1)^(-((b1^2 (m0 - x) + b0^2 (-m1 + x))^2/((b0 - b1)^3 (b0 + b1)^3))) b1^(b1^2/( b0^2 - b1^2)) E^(( 2 b0^4 + b1^2 (2 b1^2 + (m0 - m1) (3 m0 + m1 - 4 x)) - b0^2 (4 b1^2 + (m0 - m1) (m0 + 3 m1 - 4 x)))/( 4 (b0 - b1)^2 (b0 + b1)^2))] /. {m0 -> 0.5, m1 -> 1.5, x -> 1}, b1 > 0, b0 > 0}, {b0, b1}] During evaluation of In[313]:= General::unfl: Underflow occurred in computation. >> During evaluation of In[313]:= General::ovfl: Overflow occurred in computation. >> During evaluation of In[313]:= FindMaximum::nrnum: The function value Indeterminate is not a real number at {b0,b1} = {0.288676,0.288675}. >> Out[313]= FindMaximum[{If[b0 == b1, E^(-((m0^2 + m0 m1 + m1^2 - 3 m0 x - 3 m1 x + 3 x^2)/(6 b1^2)))/( b1 Sqrt[2 \[Pi]]), (1/Sqrt[2 \[Pi]]) b0^(-(b0^2/(b0^2 - b1^2))) (b0/ b1)^(-((b1^2 (m0 - x) + b0^2 (-m1 + x))^2/((b0 - b1)^3 (b0 + b1)^3))) b1^(b1^2/( b0^2 - b1^2)) E^(( 2 b0^4 + b1^2 (2 b1^2 + (m0 - m1) (3 m0 + m1 - 4 x)) - b0^2 (4 b1^2 + (m0 - m1) (m0 + 3 m1 - 4 x)))/( 4 (b0 - b1)^2 (b0 + b1)^2))] /. {m0 -> 0.5, m1 -> 1.5, x -> 1}, b1 > 0, b0 > 0}, {b0, b1}] by the way the case of b1==b0 is the limit of the general formula with b1->b0. thank you very much, igor URL: ,

 Subject (listing for 'under and overflow occuring with FindMaximum') Author Date Posted under and overflow occuring with FindMaximum igor 07/05/12 09:13am Re: under and overflow occuring with FindMaximum Bill Simpson 07/05/12 11:29pm Re: Re: under and overflow occuring with FindMa... igor 07/07/12 3:56pm
 Next Comment > Help | Reply To Topic