MathGroup Archive 2006

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

Search the Archive

Re: simplify a trig expression


This is one of those cases where FullSimplify will not work because  
it lacks a suitable transformation function. In this particular case  
the transformation function is of the form:

f[n_*Log[a_]] := Log[a^n]

Of course this is only valid with various assumptions on n and a, but  
I won't bother with this here. Anyway, observe that:


FullSimplify[Integrate[Cos[x]/(Sin[x] + 1), x],
   TransformationFunctions -> {Automatic, f}]


Log[Sin[x] + 1]

Note also that Simplify will not work even when you add f.

I am not sure if there are good reasons for adding a version of f  
(taking account of suitable assumptions) to the default  
transformation functions of FullSimplify. It may however be a good  
idea to have another possible value for the option  
TransformationFunctions besides only Automatic and user defined ones.  
In fact I have suggested in the past one or two other useful  
TransformationFunctions; perhaps it might be a good idea to define  
more and  collect them into a single option value or maybe several.

Andrzej Kozlowski






On 31 Mar 2006, at 13:09, Murray Eisenberg wrote:

> A direct substitution (with paper and pencil) gives that the  
> integral of
>   Cos[x]/(Sin[x] + 1) is Log[Sin[x] + 1].  This is valid provided  
> Sin[x]
> is not -1.
>
> Mathematica gives:
>
>    Integrate[Cos[x]/(Sin[x] + 1), x]
> 2 Log[Cos[x/2] + Sin[x/2]]
>
> Is there some simple way to coerce the latter Mathematica-supplied
> result into the paper-and-pencil answer?
>
> The closest I could get is:
>
>    Log[TrigExpand[Expand[(Cos[x/2] + Sin[x/2])^2]]] /.
>    {Sin[x/2] -> Sqrt[(1 - Cos[x])/2],
>     Cos[x/2] -> Sqrt[(1 + Cos[x])/2]}
> Log[1 + Sqrt[1 - Cos[x]]*Sqrt[1 + Cos[x]]]
>
> Am I not seeing some easier TrigExpand or TrigReduce method?
>
> -- 
> Murray Eisenberg                     murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305
>


  • Prev by Date: Re: Plot Truncation in RealTime3D
  • Next by Date: Re: simplify a trig expression
  • Previous by thread: Re: simplify a trig expression
  • Next by thread: Re: Re: simplify a trig expression