Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Problems solving using Solve

  • To: mathgroup at
  • Subject: [mg68822] RE: [mg68809] Problems solving using Solve
  • From: "David Park" <djmp at>
  • Date: Sun, 20 Aug 2006 04:43:40 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


Don't do so much in one step. When I plug your data into Cone there are
already problems. First make certain that the Cone routine is working and
giving you what you expect. If it isn't you could add Print statments in
Cone to see what is happening.

Also, I would calculate afg and look at it before plugging into the last
Solve statement.

Also, are you expecting afg to be calculated entirely symbolically? If you
define the data including centerOfMassy, then you couldn't differentiate
with respect to centerOfMassy.

If you have a problem you have to go back and make certain that each step is
working before putting it all together.

David Park
djmp at

From: akil [mailto:akomur at]
To: mathgroup at

I have a problem suing the following code:

Cone[beta_, v_,rcAB_,rcCD_,ax_,ay_,cx_,cy_,centerOfMassx_,centerOfMassy_] :=
{betaUsed, vtemp, fx, fy, ex, ey,
      betaUsed = beta ;
      vtemp = v;
      fline[x_] := Tan[betaUsed]x - Tan[betaUsed]vtemp;
      fx = x /. Solve[fline[x] == cd[x,rcCD,cx,cy], x][[1]];
      fy = cd[fx,rcCD,cx,cy];
      criticalRC = (centerOfMassy - fy)/(centerOfMassx - fx);
      criticalHeight = -criticalRC*fx + fy;
      ex = (-ay + rcAB*ax + criticalHeight)/(rcAB + (-criticalRC));
      ey = ab[ex,rcAB,ax,ay];
      xVerplaatsing = ex - vtemp;
      ePx2Py2 = Sqrt[xVerplaatsing^2 + ey^2];
      waarde = xVerplaatsing/ePx2Py2;

afg =
TimeConstraint -> 1 ];
Solve[afg== 0, v];

{ax,ay}= {-44.9376, 36.1678} and {cx,cy}= {17.8329, 122.477} and
{centerOfMassx,centerOfMassy}={-18.6338,72.3356} and rcAB=-0.166667 and

Doing the Solve[afg== 0, v] takes ages (after an hour I quit it). Is there
any way I can make it work faster? Is any code in Cone such that it
unnecessarily makes it run faster? So are there any ways I can try to make
everything run faster? Using integers it runs, but it takes too long when
using real cones (made up of four points A B C D and a centerOfMass).


  • Prev by Date: Re: too many special linear matrices
  • Next by Date: Re: Problems solving using Solve
  • Previous by thread: Re: Problems solving using Solve
  • Next by thread: Re: Problems solving using Solve