factor/simplification problem



Sorry, I did not mean to imply that the expression could be completely
simplified to that short expression, only that there are terms I would
like factored.  If I consider the denominator to be an expression in
terms of c and k, their coefficents are equal:

(%i79) D:denom(test);
(%o79) beta^3*EI*(cos(beta)*cosh(beta)*L*c*s+L*c*s+cos(beta)*cosh(beta)*L*k+L*k+beta*cos(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI)
(%i80)D0:D,c=0,k=0;
(%o80) beta^3*EI*(beta*cos(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI)
(%i82) Dc:radcan(D-D0),k=0;
(%o82) (beta^3*cos(beta)*cosh(beta)+beta^3)*EI*L*c*s
(%i83) Dk:radcan(D-D0),c=0;
(%o83) (beta^3*cos(beta)*cosh(beta)+beta^3)*EI*L*k
(%i84) radcan(D-Dc-Dk-D0);(%o84) 0

I would like the denominator to be expressed as
D2:(beta^3*cos(beta)*cosh(beta)+beta^3)*EI*L*(c*s+k)+D0;

(%i87) radcan(D-D2);
(%o87) 0

D2 just seems cleaner to me than D:
(%i88) D2;
(%o88) (beta^3*cos(beta)*cosh(beta)+beta^3)*EI*L*(c*s+k)+beta^3*EI*(beta*cos(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI)
(%i89) D;
(%o89) beta^3*EI*(cos(beta)*cosh(beta)*L*c*s+L*c*s+cos(beta)*cosh(beta)*L*k+L*k+beta*cos(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI)

I guess I just showed that I can make Maxima do what I want, it just
seems like it shouldn't be that hard (i.e. manually finding the
coeffiecents of c and k and then re-writing the denominator after
verifying that the coefficents of c and k are nearly identical - with
an extra factor of s).

Ryan

On 5/15/07, Viktor T. Toth <vttoth at vttoth.com> wrote:
> Ryan,
>
> I don't think that the expression you expect to see is a correct
> simplification of your original expression. They certainly evaluate to
> different numerical values:
>
> (%i1)
> test:(L^3*(cos(beta)*sinh(beta)*L*c*s-cosh(beta)*sin(beta)*L*c*s+cos(beta)*s
> inh(beta)*L*k-cosh(beta)*sin(beta)*L*k-2*beta*sin(beta)*sinh(beta)*EI))/(bet
> a^3*EI*(cos(beta)*cosh(beta)*L*c*s+L*c*s+cos(beta)*cosh(beta)*L*k+L*k+beta*c
> os(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI))$
> (%i2) test,beta=%pi/4,L=1,c=1,s=1,k=1,EI=1$
> (%i3) %,numer;
> (%o3)                         - 0.91779016483503
> (%i4) test2:cos(beta)*cosh(beta)*L*(c*s+k)$
> (%i5) test2,beta=%pi/4,L=1,c=1,s=1,k=1,EI=1$
> (%i6) %,numer;
> (%o6)                          1.87328013886286
>
>
> Generally, your friends in this case would be trigsimp, factor, expand,
> trigexpand and trigreduce (to name a few), but of course, Maxima will not
> produce a result (or so we hope!) that is mathematically not correct.
>
>
> Viktor
>
>
>
>
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
> On Behalf Of Ryan Krauss
> Sent: Tuesday, May 15, 2007 5:36 PM
> To: maxima list
> Subject: factor/simplification problem
>
> I have this expression
> test:(L^3*(cos(beta)*sinh(beta)*L*c*s-cosh(beta)*sin(beta)*L*c*s+cos(beta)*s
> inh(beta)*L*k-cosh(beta)*sin(beta)*L*k-2*beta*sin(beta)*sinh(beta)*EI))/(bet
> a^3*EI*(cos(beta)*cosh(beta)*L*c*s+L*c*s+cos(beta)*cosh(beta)*L*k+L*k+beta*c
> os(beta)*sinh(beta)*EI-beta*cosh(beta)*sin(beta)*EI))
>
> and it has terms in the denominator like
> cos(beta)*cosh(beta)*L*c*s+cos(beta)*cosh(beta)*L*k
>
> I don't seem to be able to make Maxima factor/simplify this as
> cos(beta)*cosh(beta)*L*(c*s+k)
>
> which I would prefer.  My knowledge of Maxima simplification is not
> all that great, but poking around in the manual and searching the help
> hasn't lead me to an answer I know how to use.
>
> Can someone please help me with this?
>
> Thanks,
> Ryan
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>