       Re: Can Mathematica Do This?

• To: mathgroup at smc.vnet.net
• Subject: [mg8255] Re: Can Mathematica Do This?
• From: "Seth J. Chandler" <SChandler at uh.edu>
• Date: Sat, 23 Aug 1997 01:58:52 -0400
• Organization: University of Houston Law Center
• Sender: owner-wri-mathgroup at wolfram.com

```A member wrote in . . .

Thanks to those who e-mailed me with some suggestions.  Although, I am
now a little more familiar with Mathematica, the problem I need to solve

seems to be too tough for Mathematica, even though it "looks" like a
simple
problem.  I tried FindMinimum, NDsolve, among other attempts, and I
either
get an error of the form ".... something is not a real number", or
Mathematica takes the command but never returns an answer!  Here is the
problem in case some kind soul wants to give it a try:

Find the minimum of f in c and h
f = (c d1+d2) r (2/((c+1) (h-c+1))) + d3 h/2 +
(c d4+d5) r (2/((c+2)*(h-c+1)))

Note that c <= h, and c,h >=0.  If it helps, h < 10,000.  The d's are
real numbers in the range 0 to 1.0, and r is real in the range 0 to
100,000.

Dear Novice,

I'm not sure I qualify as a kind soul, but I did get Mathematica 3.0.1
to produce a result in terms of Root objects. Root objects are discussed
in the 3.0 book and in the help file that comes with the program. I then
did a numeric example and found that the answer met your criteria. Hope
this helps.

In:=
f = (c d1+d2) r (2/((c+1) (h-c+1))) + d3 h/2 +
(c d4+d5) r (2/((c+2)*(h-c+1)))

Out=
\!\(\(d3\ h\)\/2 +
\(2\ \((c\ d1 + d2)\)\ r\)\/\(\((1 + c)\)\ \((1 - c + h)\)\) +
\(2\ \((c\ d4 + d5)\)\ r\)\/\(\((2 + c)\)\ \((1 - c + h)\)\)\)
In:=
Out//Shallow=
{{h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,1]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,2]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,3]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,4]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,5]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,6]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,7]},{
h\[Rule]Power[\[LeftSkeleton]2\[RightSkeleton]] +
\[LeftSkeleton]6\[RightSkeleton],
c\[Rule]Root[\[LeftSkeleton]1\[RightSkeleton]&,8]}}
In:=

Out=
{{h\[Rule]-641.738,c\[Rule]-6.93429},{h\[Rule]-449.714,c\[Rule]-1.50028},{

h\[Rule]444.714,c\[Rule]-1.49972},{h\[Rule]636.738,c\[Rule]3.93429},{
h\[Rule]626.564\[InvisibleSpace]-5.83327 I,c\[Rule]-4.21729-4.65961
I},{
h\[Rule]626.564\[InvisibleSpace]+5.83327 I,c\[Rule]-4.21729+4.65961
I},{
h\[Rule]-631.564-5.83327 I,c\[Rule]1.21729\[InvisibleSpace]-4.65961
I},{
h\[Rule]-631.564+5.83327 I,c\[Rule]1.21729\[InvisibleSpace]+4.65961
I}}
In:=
Select[numericexample,
Re[#[[1,2]]]>0 && Re[#[[2,2]]]>0 && Im[#[[1,2]]]==0 &&
Im[#[[2,2]]]==0&]
Out=
{{h\[Rule]636.738,c\[Rule]3.93429}}

```

• Prev by Date: Re: Re: Threading objects of unequal length
• Next by Date: Re: More questions on expanding function names
• Previous by thread: Re: Re: Can Mathematica Do This?
• Next by thread: Incorrect FullSimplify result involving BesselK functions