Comment #159 on issue 1694 by asmeurer: solve has many issues with fractions
http://code.google.com/p/sympy/issues/detail?id=1694
Here is a problem I tried doing in SymPy recently but the solver couldn't
handle some things. I only tried in master because I didn't know which of
your branches to try it in.
You have a rectangular field surrounded by a fence, and the fence also
crosses the field diagonally. Given a fixed amount of fence, maximize the
area of the field.
The method of solving the problem is as follows:
if F is the fixed length of fence, and x and y are the dimensions of the
field, then you have
F = 2*x + 2*y + sqrt(x**2 + y**2) (1)
You want to maximize
A = x*y (2)
So you solve (1) for x (or y) (I think SymPy couldn't do this, but I don't
remember). Substitute this value into (2), and then take the derivative
with respect to y (or x). You then solve this expression for y to find the
critical points (SymPy definitely couldn't solve this one). It should be
clear at this point which solutions are producing maximums for A. You can
then back substitute into your solved version of (1) to find x (or y).
Double points if SymPy can give the same form for both x and y at this
point (I think Maple had trouble with this), because (not surprisingly
because the problem is symmetric) the solution is a square field.
I did it in Maple, and I think the solution was something like x == y ==
(sqrt(2) + 4)/14*F.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.