MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why no simplification ?

  • Subject: [mg2584] Re: Why no simplification ?
  • From: groskyd at gv.ssi1.com (David Rosky)
  • Date: Mon, 27 Nov 1995 21:31:32 -0500
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Silicon Systems, Inc.

In <48h4bc$rcr at ralph.vnet.net>, crobc at epix.net (Christopher R. Carlen) writes:

>I evaluated the integral
>
>Integrate[ Sqrt[4t^2 + 4 + t^-2], {t, 1, E} ]
>
>by hand, which of course works out to E^2.  By adding the terms over the 
>common denominator t^2, a perfect square trinomial results in the 
>numerator.  Taking the square root yields just Integrate[ (2t^2 + 1)/t, 
>{t, 1, E} ] which is valid for t > 0 .
>
>Now I can understand that Sqrt[ x^2 ] really can't be simplified to x, 
>but is really |x| .  But in the case of a perfect square trinomial like 
>the above, which is always positive, why doesn't Mathematica recognize 
>this ?  
>
>Because it fails to recognize this simplification, the output is a big 
>mess, containing another integral.  But anyone can see that this is 
>really quite a simple integral.
>
>Anyone have any ideas how to get this integral to come out in a more 
>simple manner ?
>

In general, you can't assume Sqrt[x^2] = x unless x is positive real.
In the numerator of your trinomial, this will be always be true for any
real t since it is the square of a function of t^2 and  t^2 will 
always be positive. The same, however, doesn't apply to the denominator, t^2, 
since t is not necessarily positive even if it is real.  Mathematica knows
this and won't automatically expand out the integrand this way.

You can, however, force Mathematica to do the simplification using the
built in function PowerExpand, which expands out powers assuming that
the arguments are positive real.  The following will give you the
result you want:

Integrate[ PowerExpand[ Sqrt[ Factor[ 4t^2 + 4 + t^-2 ] ] ], t]

The Factor is required to get the argument to Sqrt in the form of
powers in the numerator and denomiator.  Mathematica won't take this
step by itself.

Regards,
David Rosky
(groskyd at gv.ssi1.com)




  • Prev by Date: Field Plots and Differential Equations
  • Next by Date: Re: Problem: Plotting list of {InterpolatingFunction[]}
  • Previous by thread: Re: Why no simplification ?
  • Next by thread: Re: Why no simplification ?