Substitution question



That last approach is pretty good.  Thanks for your help.

It seems like in order to make my own general substitution function
for something like this, I would want to first test that x factors out
of the numerator and x+1 factors out of the denominator if x=Gact*Gth.
 At that point, x could be anything.  This is a common problem in
feedback control systems.  How would I write a function that tests
those two conditions?

Thanks again,

Ryan

On Dec 20, 2007 11:57 PM, Milan Lukic <milan at eskimo.com> wrote:
> Just found a better way then one I emailed a minute ago:)
>
> myv1 : ratsubst(x,Gact*Gth,myvar);
> solve(x/(x+1)=Gcl,x);
> subst(%,myv1),ratsimp,factor;
>
> hth,
> Milan
>
> * Ryan Krauss &lt;ryanlists at gmail.com&gt; [2007-12-20 23:08:22 -0600]:
>
>
> > I have the following result after some calculations:
> >
> > myvar:(Gact*Gth*(Ga*s^2*xbeam+thdhat))/(Gact*Gth+1);
> >
> > I would like to define a new variable Gcl and substitute it for the
> > expression Gact*Gth/(Gact*Gth+1) in the above result.  I don't seem to
> > be able to do this easily with any substitution commands.  Is there an
> > easy way to do this substitution?  The only way I have found is to do
> > the following:
> >
> > Gcl2:Gact*Gth/(Gact*Gth+1);
> >
> > myvar2:myvar/Gcl2*Gcl;
> >
> > which produces the desired result:
> > Gcl*(Ga*s^2*xbeam+thdhat)
> >
> > but this would be a very bad approach if it were accidentally applied
> > to an expression that didn't already contain the term I am trying to
> > factor out.
> >
> > Any thoughts?
> >
> > Thanks,
> >
> > Ryan
>
> > _______________________________________________
> > Maxima mailing list
> > Maxima at math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
>
> --
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>