Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Calculation time of Solve[]' topicStudent Support Forum > General > Archives > "Calculation time of Solve[]"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/25/12 6:09pm

This is fast with a fairly simple solution.

Simplify[Reduce[{
(y1-y0)^2*a^2 == a^2*b^2 - (x1-x0)^2*b^2}, {a, b, x0, y0}]]

This slows down with a much bigger solution.

Simplify[Reduce[{(y1-y0)^2*a^2 == a^2*b^2 - (x1-x0)^2*b^2,
(y2-y0)^2*a^2 == a^2*b^2 - (x2-x0)^2*b^2}, {a, b, x0, y0}]]

This takes so long that I give up waiting for it.

Simplify[Reduce[{
(y1-y0)^2*a^2 == a^2*b^2 - (x1-x0)^2*b^2,
(y2-y0)^2*a^2 == a^2*b^2 - (x2-x0)^2*b^2,
(y3-y0)^2*a^2 == a^2*b^2 - (x3-x0)^2*b^2}, {a, b, x0, y0}]]

And you can probably guess how much slower and bigger the result might be with four equations.

Simplifying equations or getting rid of square roots or denominators before trying to solve, if you are certain that this is valid, will sometimes help speed things up, but not always.

URL: ,

Subject (listing for 'Calculation time of Solve[]')
Author Date Posted
Calculation time of Solve[] Jens 09/21/12 09:07am
Re: Calculation time of Solve[] Bill Simpson 09/25/12 6:09pm
< Previous CommentHelp | Reply To Comment | Reply To Topic