MathGroup Archive 2006

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

Search the Archive

Re: Problems solving using Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68934] Re: Problems solving using Solve
  • From: "akil" <akomur at wanadoo.nl>
  • Date: Fri, 25 Aug 2006 05:34:46 -0400 (EDT)
  • References: <ec65bn$1f8$1@smc.vnet.net> <ecboe4$r87$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I do

ab[input_,rcAB_,ax_,ay_] := rcAB*input + ay - rcAB*ax;
cd[input_,rcCD_,cx_,cy_] := rcCD*input + cy - rcCD*cx;

Cone[beta_, v_,rcAB_,rcCD_,ax_,ay_,cx_,cy_,centerOfMassx_,centerOfMassy_] :=
Module[
{betaUsed, vtemp, fx, fy, ex, ey,
waarde,criticalRC,criticalHeight,xVerplaatsing,ePx2Py2},
      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;
      ArcCos[-waarde]
];

afg[beta_,v_,rcAB_,rcCD_,ax_,ay_,cx_,cy_,centerOfMassx_,centerOfMassy_]:=
Numerator[Together[D[Cone[beta,v,rcAB,rcCD,ax,ay,cx,cy,centerOfMassx,centerOfMassy],v]]];

TopCurve[b_,rcAB_,rcCD_,ax_,ay_,cx_,cy_,centerOfMassx_,centerOfMassy_]:=Module[
{afgeleiden,solutions,curve},
  afgeleiden=afg[beta,v,rcAB,rcCD,ax,ay,cx,cy,centerOfMassx,centerOfMassy];
 solutions = Solve[afgeleiden == 0, v];
 curve = solutions[[2]];
 Return[ v /. curve /. beta -> b]
];

now, which seems to work. Tested all solutions, because Solve[afgeleiden ==
0, v]; gets up to 9 solutions in most cases. I used to take the second, and
the second still seems to be the real max/min curve.

Now I can continue with the next step, looking for intersections with anothe
complex functions as TopCurve.

Thanks guys.




  • Prev by Date: Re: Re: Trigonometric simplification
  • Next by Date: Re: General--Difficulties in Understanding Mathematica Syntax
  • Previous by thread: Re: Problems solving using Solve
  • Next by thread: Re: Rapid execution of gaussian integrals