Re: how to minimize a trigonometric function with some
- To: mathgroup at smc.vnet.net
- Subject: [mg96368] Re: [mg96323] how to minimize a trigonometric function with some
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Thu, 12 Feb 2009 06:38:30 -0500 (EST)
- References: <200902111024.FAA17258@smc.vnet.net>
- Reply-to: drmajorbob at longhorns.com
Repost with proper syntax (copy as plain text from Mathematica). I can only guess you meant f[t_] = a*Sin[t] - x0^2 + (b*Cos[t] - y0)^2 but I got that by deleting the unmatched parenthesis. If you accidentally left one out, I have the wrong function. Maybe you meant f[t_] = (a*Sin[t] - x0)^2 + (b*Cos[t] - y0)^2 Either way, you can proceed (for given values of the parameters) with g[a_?NumericQ, b_?NumericQ, x0_?NumericQ, y0_?NumericQ] = Minimize[f@t, t]; g[1, 2, 3, 4] {25 - 16 Cos[2 ArcTan[Root[-3 + 10 #1 + 22 #1^3 + 3 #1^4 &, 2]]] + 4 Cos[2 ArcTan[Root[-3 + 10 #1 + 22 #1^3 + 3 #1^4 &, 2]]]^2 - 6 Sin[2 ArcTan[Root[-3 + 10 #1 + 22 #1^3 + 3 #1^4 &, 2]]] + Sin[2 ArcTan[Root[-3 + 10 #1 + 22 #1^3 + 3 #1^4 &, 2]]]^2, {t -> 2 ArcTan[Root[-3 + 10 #1 + 22 #1^3 + 3 #1^4 &, 2]]}} N@% {11.3921, {t -> 0.508687}} Bobby On Wed, 11 Feb 2009 04:24:04 -0600, tomt <tomtforever at gmail.com> wrote: > f(t)=a*Sin[t] - x0)^2 + (b*Cos[t] - y0)^2. > t is variable,others is const. > 0<=t<2*Pi,a>0,b>0 > > I have tried it again and again in mathematica ,but can't get a right > result > -- DrMajorBob at longhorns.com
- References:
- how to minimize a trigonometric function with some symbol const
- From: tomt <tomtforever@gmail.com>
- how to minimize a trigonometric function with some symbol const