>> with respect to k. It did this correctly, BUT left
>> the derivative of coth as 1-coth^2, and did not cancel
>> the x's in numerator and denominator.

Signature
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558
>>> The precise situation was that Maple was asked to
>>> differentiate
>>> .5*(coth(..5*x/(k+1) - coth(.5*x/k))/x
>>> with respect to k. It did this correctly, BUT left
>>> the derivative of coth as 1-coth^2, and did not cancel
>>> the x's in numerator and denominator.
>>> When asked to simplify, it came up with an awful mess,
>>> doing everything in terms of cosh.
>>Is this more to your liking?
>>diff(.5*(coth(.5*x/(k+1)) - coth(.5*x/k))/x, k):
>>simplify(%, size);
>> / 2 x 2 2 2
>> |.25 k coth(.5 -----) + (-.25 - .25 k - .50 k) coth(.5 x/k)
>> \ k + 1
>> \ / 2 2
>> + .25 + .50 k| / ((k + 1) k )
>> / /
>Not really. What I wanted is
> 0.5 x 2 0.5 x 2
> 0.25 csch(-----) 0.25 csch(-----)
> k + 1 k
> ----------------- - -----------------
> 2 2
> (k + 1) k
>which is the simple form to continue to be used, or even
>with the factor .25 multiplying the rest.
>Certainly replacing 1-coth^2 by -csch^2 is simplifying,
>and I do not see putting it over a common denominator
>as such.
>>Martin
I also tried again to see if Maple could see the
equality of the expressions. The answer is no.

Signature
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558
G. A. Edgar - 01 Oct 2008 19:06 GMT
> I also tried again to see if Maple could see the
> equality of the expressions. The answer is no.
Here's how I would do that...
> f := .5*(coth(.5*x/(k+1)) - coth(.5*x/k))/x;
f := .5*(coth(.5*x/(k+1))-coth(.5*x/k))/x
> maple_answer := diff(f,k);
maple_answer :=
.5*(-.5*(1-coth(.5*x/(k+1))^2)*x/(k+1)^2+.5*(1-coth(.5*x/k)^2)*x/k^2)/x
> rubin_answer := .25*csch(.5*x/(k+1))^2/(k+1)^2
- .25*csch(.5*x/k)^2/k^2;
rubin_answer := .25*csch(.5*x/(k+1))^2/(k+1)^2-.25*csch(.5*x/k)^2/k^2
> simplify(maple_answer - rubin_answer);
0.
[Actually, I would also use 1/2 and 1/4 instead of .5 and .25 ]

Signature
G. A. Edgar http://www.math.ohio-state.edu/~edgar/
Axel Vogt - 01 Oct 2008 19:21 GMT
>>>> The precise situation was that Maple was asked to
>>>> differentiate
[quoted text clipped - 41 lines]
> I also tried again to see if Maple could see the
> equality of the expressions. The answer is no.
1.
I do not actually know, what Maple does on trigonometric and
hyperbolic functions, but it often seems difficult to force it
into a desired result (especially if using 'simplify').
So I usually try to pass to exp and log.
2.
To see where problems it in your case step in (from Maple's view)
try diff( coth(t), t) as example: the answer is 1-coth(t)^2, and
I guess you would expect -csch(t)^2.
To enforce that one needs simplify(%); convert(%,csch); or some
similar way.
3.
For a complex expression one would try 'simplify', but it is
almost impossible to guess the outcome (also because automatic
simplification steps in and cases inbetween, where assumptions
may be needed).
4.
For the last - writing as a sum of terms - I do not know any
general convenient way. However especially in your case one can
by collect(h,x) [ where is your h = diff( ...) ], but working
further destroys it again.
5.
Equality ... that may depend on k<>0, k<> -1 and x<>0, but
have not tries it seriously. Sometimes it is easier for Maple
to recognize lhs/rhs= 1 or use conversions inbetween:
hr=simplify(h, size); convert(%,expln); simplify(%);
is(%);
should do if your last expression is named hr.
All that is not what actually covers your desire, yes.
John Harper - 03 Oct 2008 02:34 GMT
>2.
>To see where problems it in your case step in (from Maple's view)
[quoted text clipped - 3 lines]
>To enforce that one needs simplify(%); convert(%,csch); or some
>similar way.
I thought this might be a similar way but Maple 11 didn't:
> diff( coth(t), t);
2
1 - coth(t)
> convert(%,csch);
4
csch(t)
1 - 1/4 ----------
2
csch(2 t)
> simplify(%);
1
- --------
2
sinh(t)
-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 6780 fax (+64)(4)463 5045
Axel Vogt - 03 Oct 2008 09:42 GMT
>> 2.
>> To see where problems it in your case step in (from Maple's view)
[quoted text clipped - 7 lines]
>
>> diff( coth(t), t);
...
>> convert(%,csch);
...
>> simplify(%);
> 1
> - --------
> 2
> sinh(t)
Yes, sorry. Finally one has to use convert again:
'diff(coth(t),t)': simplify(%): '%%'=convert(%,csch);
d 2
-- coth(t) = -csch(t)
dt