# About taking limit of an integral on Wolfram Alpha/Mathematica [closed]

I tried computing this quantity on Wolfram Alpha, but I couldn’t get any answer:

Series [ (I*x + y*exp(I*p))*(tanh (pi*(I*x + y*exp(I*p))) )*(log ((
I*x + y*exp(I*p) )^2 + a^2))*(I*y*exp(I*p)), {y,0,2}, {Assuming
x>0,y>0,a>0, p real}]

If I understand Mathematica correctly, it is evaluating

limϵ→0[∫πϕ=−πz tanh(πz)log(z2+a2)dz] for z=i(n+12)+ϵeiϕ=(1+2n)log[a2−(n+12)2]lim_{\epsilon \rightarrow 0} [ \int _{\phi = -\pi} ^{\pi} z\text{ }tanh(\pi z) log(z^2 + a^2) dz] \text{ for }z = i(n+\frac{1}{2}) + \epsilon e^{i\phi} = (1+2n)log[a^2 – (n +\frac{1}{2})^2]

Am I using Mathematica correctly?

=================

=================

1

=================

Series[
(I x + y Exp[I p]) Tanh[Pi (I x + y Exp[I p])]
Log[(I x + y Exp[I*p])^2 + a^2] I y Exp[I p],
{y, 0, 2},
Assumptions -> {x > 0, y > 0, a > 0, p âˆˆ Reals}
]

Asterisks can be used for multiplication, but a space is more usual. I removed unnecessary parentheses. The more important points are

all functions (Exp, Log, Tanh etc.) and other built-in symbols start with a capital letter
function application is always done using brackets, not parentheses (and it is considered quite unusual style to insert a space between the name of a function and its bracketed arguments, although it is not an error to do so)
Assumptions is an option of Series, and options are given as rules, not lists. Assuming is not an option name; rather it is the name of a function.
p real is a multiplication. To specify that p is real you should have Element[p, Reals] or its infix form, p \[Element] Reals

With the corrected input, an answer is produced quickly by Mathematica. However, when this is given to Wolfram|Alpha, it chokes horribly, interpreting it as “Series Exp Tanh”, and a completely nonsensical answer (relating to stock prices) is produced. It just goes to show that W|A cannot be used as a substitute for Mathematica, and unfortunately, if prior experience is any guide, there is probably no way to persuade W|A to interpret the input as you intend.

The result is:

SeriesData[y, 0, {
(-I)*E^(I*p)*x*Log[a^2 – x^2]*Tan[Pi*x],
-(E^((2*I)*p)*Pi*x*Log[a^2 – x^2]) +
(2*E^((2*I)*p)*x^2*Tan[Pi*x])/(a^2 – x^2) –
E^((2*I)*p)*Log[a^2 – x^2]*Tan[Pi*x] –
E^((2*I)*p)*Pi*x*Log[a^2 – x^2]*Tan[Pi*x]^2
}, 1, 3, 1
]

Yes, if I had typed this in Mathematica then I would have typed as you wrote above. I though Alpha could interprete what I wrote! Can you kindly type in the answer for this or for the integral that you see on Mathematica?
– user6818
Oct 13 ’15 at 7:26

1

@user6818 I added the result. I don’t believe that Series involves any integration; only differentiation. See its documentation, which states it produces a Taylor series.
– Oleksandr R.
Oct 13 ’15 at 11:22

Thanks for the effort (1) This “SeriesData” format looks unfamiliar to me. It should have produced a Taylor series. How do I see that in the format you wriote it? (2) By “integral” I wanted to know what Mathematica gives as output for the limit of an integral that I wrote in the question.
– user6818
Oct 13 ’15 at 18:32