Problem using Solve with many unknown variables
- To: mathgroup at smc.vnet.net
- Subject: [mg66168] Problem using Solve with many unknown variables
- From: akil <akil39 at gmail.com>
- Date: Tue, 2 May 2006 02:43:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I'm quite new to mathematica, for a project I made a method of which I need the derivative and then need the derivative==0, which I try with Solve.Sorry for some variables having Dutch names, but please ignore that.
ax; ay; bx; by; cx; cy; dx; dy;
rcAB = (by - ay)/(bx - ax); ab[x_] := rcAB*x + ay - rcAB*ax;
rcCD = (dy - cy)/(dx - cx); cd[x_] := rcCD*x + cy - rcCD*cx;
centerOfMassx;centerOfMassy;
(*Cone : beta, v -> alpha. *)
Cones[beta_, v_] := Module[{betaUsed, vtemp, fx, fy, ex, ey, waarde},
betaUsed = beta ; vtemp = v;
fline[x_] := Tan[betaUsed]x - Tan[betaUsed]vtemp;
fx = x /. Solve[fline[x] == cd[x], x][[1]];
fy = cd[fx];
criticalRC = (centerOfMassy - fy)/(centerOfMassx - fx);
criticalHeight = -criticalRC*fx + fy;
ex = (-ay + rcAB*ax + criticalHeight)/(rcAB + (-criticalRC));
ey = ab[ex];
xVerplaatsing = ex - vtemp;
ePx2Py2 = Sqrt[xVerplaatsing^2 + ey^2];
waarde = -(xVerplaatsing/ePx2Py2);
ArcCos[waarde]
];
I need the derivative, so I do:
derivativeCone = FullSimplify[D[Cones[beta, v],
v], {{ax,
ay, bx, by,
cx, cy, dx, dy, centerOfMassx, centerOfMassy} â?? Reals},
TimeConstraint -> 1]
Which results in a huge 2 page result.Playing with TimeConstraint didn't help the result much, but it takes quite a while even now.
solutions = Solve[derivativeCone == 0, v]
Doing this seems to do nothing, I've runned it for over 8 hours, then aborted because my pc didn't react anymore.
I really need the answer so that for my program I can just fill in the values for the different variables which will be a lot faster than computing the derivative each time with the variables having values.
Any help is appreciated.
Akil