Re: Why no simplification ?

• To: mathgroup at smc.vnet.net
• Subject: [mg2584] Re: Why no simplification ?
• From: groskyd at gv.ssi1.com (David Rosky)
• Date: Mon, 27 Nov 1995 21:31:32 -0500
• 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: Q> on COMBINING PLOTS w/ diff. axes.
• Next by Date: Re: Problem: Plotting list of {InterpolatingFunction[]}
• Previous by thread: Re: Why no simplification ?
• Next by thread: How to write a loop
{"ft_lang_label":"__label__en","ft_lang_prob":0.86232376,"math_prob":0.9225786,"size":2041,"snap":"2023-40-2023-50","text_gpt3_token_len":571,"char_repetition_ratio":0.100638196,"word_repetition_ratio":0.011173184,"special_character_ratio":0.2768251,"punctuation_ratio":0.15529412,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99260443,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-11T06:03:08Z\",\"WARC-Record-ID\":\"<urn:uuid:d7dbca79-7350-43b4-8dbf-16d03cbb302e>\",\"Content-Length\":\"45493\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:efa7f74a-36e5-49cb-b890-126de63db846>\",\"WARC-Concurrent-To\":\"<urn:uuid:aa7346ab-6d54-4baa-9a84-04ae556a367c>\",\"WARC-IP-Address\":\"140.177.9.73\",\"WARC-Target-URI\":\"https://forums.wolfram.com/mathgroup/archive/1995/Nov/msg00097.html\",\"WARC-Payload-Digest\":\"sha1:CJ2G4HTAYVZZEZPJ6MBC552AJVUVK5BA\",\"WARC-Block-Digest\":\"sha1:22NMGZGVMWAORY2DT6QAM2S4MR3QH4J5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679103558.93_warc_CC-MAIN-20231211045204-20231211075204-00744.warc.gz\"}"}