3
$\begingroup$

I am trying to understand how WolframAlpha reduces the following trig expression $$ \frac{\ln \left(\sin \left(\frac{\alpha x}{2}\right)+\cos \left(\frac{\alpha x}{2}\right)\right)}{\alpha }-\frac{\ln \left(\cos \left(\frac{\alpha x}{2}\right)-\sin \left(\frac{\alpha x}{2}\right)\right)}{\alpha }$$ into $$\frac{\ln (\tan (\alpha x)+\sec (\alpha x))}{\alpha }$$

I tried using TrigExpand, TrigReduce and FullSimplify with no use.

CODE:

FullSimplify[Integrate[Sec[\[Alpha]*x], x], Assumptions -> {\[Alpha] > 0 && Element[x, Reals]}]
$\endgroup$
10
  • $\begingroup$ Did you try Assumptions->[Alpha]>0&& x [Element] Reals? $\endgroup$
    – user64494
    Jan 19, 2018 at 18:23
  • $\begingroup$ @user64494 yes I’ll post the code. It doesn’t work $\endgroup$
    – DMH16
    Jan 19, 2018 at 18:27
  • $\begingroup$ The command with the option Assumptions -> [Alpha] > 0 && x >= 0 && x <= Pi/(4*[Alpha]) performs (2 ArcTanh[Tan[(x [Alpha])/2]])/[Alpha]. $\endgroup$
    – user64494
    Jan 19, 2018 at 18:36
  • $\begingroup$ This will get you part way there Simplify[Log[Sin[a x/2]+Cos[a x/2]]/a-Log[Cos[a x/2]-Sin[a x/2]]/a, Sin[a x/2]+Cos[a x/2]>0 && Cos[a x/2]-Sin[a x/2]>0]To finish you probably need to think more about zeros in denominators $\endgroup$
    – Bill
    Jan 19, 2018 at 18:39
  • 3
    $\begingroup$ Note that Integrate[Sec[α x], x] /. {x -> 1, α -> 3.} is different from Log[Tan[α x] + Sec[α x]]/α /. {x -> 1, α -> 3.}, so the functions are not the same. If that's not important, maybe FullSimplify[Integrate[Sec[α x], x], TransformationFunctions -> {Automatic, Log@*Exp}] suffice? $\endgroup$
    – Coolwater
    Jan 19, 2018 at 20:25

1 Answer 1

3
$\begingroup$

May be this can be a start. I can't find method for final transformation yet. May be it needs special rule.

ClearAll[x,a,A0,B0];
rep    =  {A0->Sin[a x/2],B0->Cos[a x/2]}
expr   =  Log[A0+B0]-Log[B0-A0] ;
result =  (FullSimplify[Log[Exp[expr]]]/.rep)/a

$$ \frac{\log \left(\frac{\sin \left(\frac{a x}{2}\right)+\cos \left(\frac{a x}{2}\right)}{\cos \left(\frac{a x}{2}\right)-\sin \left(\frac{a x}{2}\right)}\right)}{a} $$

$\endgroup$
1
  • $\begingroup$ Interesting! Thank you for the answer. I won't accept one yet, since I want to see if other ideas come by. $\endgroup$
    – user372003
    Jan 19, 2018 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.