A problem with an integral
- Subject: A problem with an integral
- From: Barton Willis
- Date: Fri, 8 Jan 2010 19:19:47 -0600
You need an integration constant:
(%i1) load(to_poly_solver)$
(%i2) eq : x = integrate(1/(t*sqrt(1-t)),t,0) + %i * %pi$
(%i4) sol : %solve(eq,t)$
(%i5) part(sol,1,2,1);
(%o5) t=(4*%e^x)/(%e^(2*x)+2*%e^x+1)
(%i6) demoivre(subst(x = x/ %i, demoivre(subst(x=%i*x,%))));
(%o6) t=(4*(sinh(x)+cosh(x)))/(sinh(2*x)+cosh(2*x)+2*(sinh(x)+cosh(x))+1)
It's too cold for me figure out how to crunch this to 1/cosh(x/2)^2. I give
up,
but it's true:
(%i7) factor(exponentialize(1/cosh(x/2)^2 - rhs(%)));
(%o7) 0
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To:?maxima at math.utexas.edu
>From:?Michel?Talon?<talon at lpthe.jussieu.fr>
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?01/08/2010?07:22AM
>Subject:?[Maxima]?A?problem?with?an?integral
>
>Trying?to?check?an?integral?leading?to?the?famous?soliton,?i?find?the
>following?problem?with?maxima:
>
>(%i1)?integrate(1/(t*sqrt(1-t)),t);
>(%o1)?????????????log(sqrt(1?-?t)?-?1)?-?log(sqrt(1?-?t)?+?1)
>
>Note?this?is?not?good?because?presumably?the?argument?of?the?first?log?is
><0.?The?correct?solution?is?as?follows:
>
>
>(%i2)?X:?-2*atanh(sqrt(1-t));
>(%o2)???????????????????????-?2?atanh(sqrt(1?-?t))
>(%i3)?diff(X,t);
>???????????????????????????????????????1
>(%o3)????????????????????????????-------------
>?????????????????????????????????sqrt(1?-?t)?t
>
>This,?by?inversion?leads?to?the?soliton:
>
>
>(%i4)?solve(x=X,t);
>Is??x??positive,?negative,?or?zero?
>
>p;
>?????????????????????????????????????????????????x
>(%o4)??????????????????????[sqrt(1?-?t)?=?-?tanh(-)]
>?????????????????????????????????????????????????2
>(%i5)?%^2;
>???????????????????????????????????????????2?x
>(%o5)?????????????????????????[1?-?t?=?tanh?(-)]
>?????????????????????????????????????????????2
>(%i6)?solve(%,t);
>???????????????????????????????????????????2?x
>(%o6)?????????????????????????[t?=?1?-?tanh?(-)]
>?????????????????????????????????????????????2
>(%i7)?trigsimp(%);
>????????????????????????????????????????1
>(%o7)???????????????????????????[t?=?--------]
>?????????????????????????????????????????2?x
>?????????????????????????????????????cosh?(-)
>???????????????????????????????????????????2
>
>
>The?last?formula?is?the?well?known?one?soliton?solution.?If?one?performs
>the
>same?calculation?starting?from?%o1?one?gets?1/sh^2(x/2)?which?is?very?bad
>since?it?diverges?at?0.
>
>By?the?way,?the?same?result?is?obtained?in?a?much?direct?way?with?maple:
>
>niobe%?maple
>????|\^/|?????Maple?9?(IBM?INTEL?LINUX)
>._|\|???|/|_.?Copyright?(c)?Maplesoft,?a?division?of?Waterloo?Maple?Inc.
>2003
>?\??MAPLE??/??All?rights?reserved.?Maple?is?a?trademark?of
>?<____?____>??Waterloo?Maple?Inc.
>??????|???????Type???for?help.
>>?int(1/(t*sqrt(1-t)),t);
>?????????????????????????????????????????????????????????????1/2
>???????????????????????????????????????????-2?arctanh((1?-?t)???)
>
>>?solve(%=X,t);
>????????????????????????????????????????????????????????????2
>???????????????????????????????????????????????1?-?tanh(X/2)
>
>>?quit
>
>
>
>--
>Michel?Talon
>
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima