On Tue, 2007-02-13 at 07:00 +0000, Scott Ballantyne wrote:
> Experimenting with maxima for the first time, I tried to compute the
> derivative of (%e^x-%e^(-x))/(%e^x+%e^(-x)), which I believe should
> be: 4/(e^x+e^-x)^2.
>
> Maxima gives 1 - (e^x-e^(-x))^2/(e^x+e^(-x))^2
That's the big difference between a CAS and a number-crunching program.
There is not such a thing as the "simplest" answer. For instance, I'd
say the result of your calculation is (sech(x))^2. Notice:
(%i2) exponentialize((sech(x))^2);
(%o2) 4/(%e^x+%e^-x)^2
> I try to simplify this (I used ratsimp(%) and then factor(%)), maxima
> delivers
> 4e^(2x)/(e^(2x)+1)^2
>
> Perhaps this is correct, although it doesn't look like it at first
4e^(2x)/(e^(2x)+1)^2 = 4/(e^(-2x)(e^(2x)+1)^2) =
4/(e^(-x)(e^(2x)+1)^2 =
4/(e^(-x)e^(2x)+e^(-x))^2 =
4/(e^x+e^(-x))^2
> What is the best way to get the simple form of this expression?
Think of e^x as y. What you are asking is how to factorize a rational
function into 4/(y+y^(-1))^2, instead of 4y^2/(y^2+1)^2
You would have to favor the exponents 1 and -1 over 1 and 2. That
should be doable by Maxima, but I cannot help you with that.
Regards,
Jaime Villate