Re: Minimization Algebraically
- To: mathgroup at smc.vnet.net
- Subject: [mg103416] Re: Minimization Algebraically
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Mon, 21 Sep 2009 05:49:48 -0400 (EDT)
- References: <h8vkeh$8un$1@smc.vnet.net> <h9283t$log$1@smc.vnet.net>
On 2009.09.19. 11:26, Szabolcs Horv=E1t wrote:
> On 2009.09.18. 11:38, Bayers, Alexander wrote:
>> I am currently trying to minimize the following function in Mathematica:
>>
>> ((360*(-1 + E^(0.2493150684931507*r0)))/91 - r[L3m])^2
>>
>> Using r0. When I try to minimize this algebraically using Minimize,
>> however, I receive the following answer:
>>
>> Minimize[((360*(-1 + E^(0.2493150684931507*r0)))/91 - r[L3m])^2, {r0}]
>>
>> Instead of an algebraic answer. Is there any way to coerce Mathematica
>> to return the algebraic answer through a call to minimize?
>>
>
> Do not use inexact number ("decimals") if you need a symbolic answer.
> Rationalize[] can help to convert the quantities in the expression to
> exact forms.
>
> From the little information you provided it looks like the function r[]
> was not defined. Minimize will only work with explicit expressions, it
> can't handle unspecified functions.
>
Actually I made a blunder here, after all r[L3m] should be treated as a
simple number. I am not sure why Minimize doesn't return an answer
(after using Rationalize on the input).
In[9]:= Rationalize[((360*(-1 + E^(0.2493150684931507*r0)))/91 -
r[L3m])^2
]
Out[9]= (360/91 (-1 + E^(91 r0/365)) - r[L3m])^2
Here let's replace the part 360/91 (-1 + E^(91 r0/365)) with a single
variable p, so the expression to be minimized will be
(p - r[L3m])^2
The solution is obviously p == r[L3m]
The value corresponding for r0 can be obtained using Reduce:
In[11]:= Reduce[360/91 (-1 + E^(91 r0/365)) == r[L3m], r0, Reals]
Out[11]= r[L3m] > -(360/91) &&
r0 == 365/91 Log[1/360 (360 + 91 r[L3m])]