2

I used free-from input to do this:

= integrate sec x with respect to x

I got a huge amount of information, but I'd like to focus on this plot that was given:

enter image description here

Can my colleagues show how to do this plot?

It's also interesting that Mathematica gives this answer:

In[91]:= Integrate[Sec[x], x]

Out[91]= -Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]]

But if we click on Step-by-step-solutions, Wolfram Alpha gives this answer:

enter image description here

Which is similar to the hand-calculated solution

$$\ln|\sec x+\tan x|+C$$

found by students in Calculus II.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
David
  • 14,883
  • 4
  • 44
  • 117

1 Answers1

4

It depends on the CAS system. $\int \sec(t) \, dt$ gives

Mathematica:     ln(cos(t/2)+sin(t/2))-ln(cos(t/2)-sin(t/2))
Wolfram/ALpha:   ln(tan(t)+sec(t))+ constant
Rubi:            arctanh(sin(t))
Fricas:          1/2 ( ln(1+sin(t)) - ln(1-sin(t)) )
Maple            ln(sec(t)+tan(t))
Derive 6.10      LN(TAN((2*t + pi)/4))
Maxima           log((1+sin(x))/cos(x))

As for your plot, you can do

expr = Log[Sec[x] + Tan[x]];
Plot[{Re@expr, Im@expr}, {x, -2 Pi, 2 Pi}, PlotStyle -> {Blue, Red}, 
    PlotLegends -> {"real part", "imaginary part"}, 
    PlotLabel -> TraditionalForm[expr]]

Mathematica graphics

reference: sci.math.symbolic

Nasser
  • 143,286
  • 11
  • 154
  • 359