Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Re: simplify a trig expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65449] Re: [mg65436] Re: [mg65415] simplify a trig expression
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sun, 2 Apr 2006 05:00:09 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200603311109.GAA15029@smc.vnet.net> <200604011038.FAA07301@smc.vnet.net>
  • Reply-to: murray at math.umass.edu
  • Sender: owner-wri-mathgroup at wolfram.com

OK, now how about the following--another case where Mathematica gives a 
more complicated looking answer than the typical paper-and-pencil direct 
substitution would provide?

Mathematica gives:

   Integrate[Sin[x]/(1 - Cos[x]), x]
2*Log[Sin[x/2]]

I'd like an answer in the form of Log[1-Cos[x]]  (plus a constant, to 
actually equal the above).  The best I've been able to do so far is:

   (Integrate[Sin[x]/(1 - Cos[x]), x]
      // Simplify[# /. a_*Log[b_]:>Log[b^a]] &
      //MapAt[TrigReduce, #, 1]&) /. (Log[c_ b_]->Log[b]+Log[c])
-Log[2] + Log[1 - Cos[x]]

Is there some easier way?

Andrzej Kozlowski wrote:
> 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
>>
> 
> 

-- 
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: simplify a trig expression
  • Next by Date: Vector algebra
  • Previous by thread: Re: simplify a trig expression
  • Next by thread: Re: Re: Re: simplify a trig expression