Questions related to the calculus and analysis branches of Mathematica, including, but not limited to, limits, derivatives, integrals, series, and residues.

learn more… | top users | synonyms (2)

26
votes
4answers
1k views

Generating evenly spaced points on a curve

In the KnotData package a simple command such as points = Table[KnotData[{3, 1}, "SpaceCurve"][t], {t, 0, 2 Pi, 0.1}]; will ...
22
votes
3answers
2k views

How to find the period of an arbitrary mathematical function?

Is there a function to find the period of an arbitrary (possibly complex) function in Mathematica?
20
votes
4answers
742 views

An apparently “simple” limit?

Let $c$ and $h$ be real values. I was using Mathematica to compute the limit $(h \rightarrow \infty)$ of the following expression: $$ \frac{\left(h^2 +c^2 h^2 + \sqrt{4 h^2+\left(h^2+c^2 ...
17
votes
1answer
341 views

Incorrect result from Integrate

I attempted to calculate the following integral: ...
17
votes
2answers
445 views

Have I found a bug in Integrate?

The following command gives 0 in Mathematica 9.0.1. ...
16
votes
3answers
1k views

Can we teach Mathematica about functional differentiation?

The key relation for functional differentiation is $$\frac{\delta}{\delta f(y)}f(x)=\delta(x-y), $$ where $\delta(x-y)$ is the Dirac delta function, and the usual properties of differentiation (e.g. ...
16
votes
1answer
656 views

How can the {x,y,z} points that fall on the outer boundary of a set of values be selected and smoothly surfaced?

For a given set of x,y,z values, that may, or may not form a uniform shape, how can the center of the data cloud be found, and the surface points be located and a solid smooth surface created from ...
15
votes
4answers
3k views

Finding Limits in several variables

Is there a way to find a limit of a multivariable function, like $$\lim_{(x,y)\to (0,0)} f(x,y)$$ with Mathematica? When $f$ is continuous, we can use $$\lim_{(x,y)\to (0,0)} ...
15
votes
1answer
395 views

Speeding up trigonometric integral

Context On a possible non trivial toric topology for the Universe (nothing less!). Problem I would like to carry out the following integral for $\ell=2,4\cdots 20$. $$\int _0^{\pi }\int _0^{2 \pi ...
15
votes
2answers
285 views

Inconsistent results from equivalent integrals

Why is Mathematica returning different values for these two integrals: I am just being introduced to complex integration, so it's possible that I have a misunderstanding of how this works, but in ...
15
votes
0answers
143 views

Are greek symbols causing different evaluation?

I've updated today to Mathematica 9.0.1.0 from version 8 and found something that absolutely confuses me. Let us define a piecewise function: ...
14
votes
2answers
956 views

How to deal with complicated gaussian integrals in Mathematica?

As we know, for most Gaussian integrals, we can get the analytical result. Now I have many Gaussian integrals to treat, which have the following general form, ...
14
votes
2answers
138 views

Symbolic derivatives are being calculated numerically

Just found the following while debugging a problem. Mathematica is calculating the derivative of IntegerPart[x] in some odd way: ...
14
votes
1answer
273 views

How to represent a continuous monotonic phase of Airy functions?

Note: In this question I am concerned only with real-valued variables and functions. DLMF, §9.8 Airy Functions, Modulus and Phase, formula $9.8.4$ defines the phase of Airy functions: ...
13
votes
5answers
706 views

Does $x>0$ imply that $x\in\mathbb{R}$?

Let’s assume I input Assuming[x > 0, expression] Is it assumed by Mathematica that $x$ is a real number? Or that the real part of $x$ is positive? Something ...
13
votes
3answers
773 views

How to evaluate the 0/0 type limit in Mathematica?

When I use Limit to evaluate the $k \to 0$ limit of ((k + 2) (α^2 - Sqrt[α^4 + k]) + k)/(α^2 - Sqrt[α^4 + k] + 2 k) If ...
13
votes
2answers
304 views

What kind of hypergeometric function is it?

I found a formula for an integral of a product of three Bessel functions at The Wolfram Functions Site: I cannot understand what kind of hypergeometric function it is. The Mathematica code given ...
13
votes
4answers
536 views

Mathematica gives wrong result while Wolfram|Alpha is correct

Why does Mathematica and Wolfram|Alpha give different results based upon the same code? I know Wolfram|Alpha's 7.85 is correct.
13
votes
2answers
697 views

Suppressing negative roots in Mathematica

Problem Using Mathematica's Solve operator can sometimes lead to an output involving a positive and negative root (say when solving for a variable such as ...
13
votes
1answer
387 views

What strategies can I use to evaluate a limit when Limit[] returns unevaluated

I'm trying to find the following limit using Mathematica: $$\lim_{N\to\infty}\sum_{k=1}^N\left(\frac{k-1}{N}\right)^N$$ The problem is taken from here and is known to converge to ...
13
votes
1answer
227 views

How do I get a general form for n-th derivative of a function? [duplicate]

I tried the following but it basically returns unevaluated: ...
12
votes
1answer
1k views

How does Mathematica integrate?

Basically, this question can be considered to be an extenstion to my other question. What I wanted to do was this integral as homework (it is indefinite BTW so no approximations using Simpson's Rule ...
12
votes
1answer
267 views

Extra factors appear when evaluating Euler integrals

When I perform the double integral in Mathematica, Integrate[(x (1 - x))^z (y (1 - y))^z, {x, 0, 1}, {y, 0, 1}] which should give $$B(z+1,z+1)^2 = ...
11
votes
4answers
4k views

How to find the domain and range of a function with Mathematica?

I'm studying calculus and in some exercises I am asked to find the domain and range of a function. Does Mathematica have already a built-in function for this? I can imagine some ways of doing so, ...
11
votes
4answers
467 views

How to make a Line[] with no end?

I'm trying to do this: In this graph, the secant points are aproximated in order to become the tangent, it seems I need some kind of function which plots a line based on two points and it's points ...
11
votes
3answers
173 views

How to efficiently find moments of a multinormal distribution?

I have a multinormal distribution with covariance matrix $\sigma$ and zero mean. I want to find moment $$ E[x_1^{r_1}x_2^{r_2}\cdots x_n^{r_n}] =\,? $$ Of course, there is a build-in function ...
11
votes
2answers
478 views

How can I implement the method of Lagrange multipliers to find constrained extrema?

I want to form the function $h=f-\lambda_{1}g_{1}-\lambda_{2}g_{2}$ where $f$ is the function to optimize subject to the constraints $g_{1}=0$ and $g_{2}=0$ so that I can solve the first partial ...
11
votes
5answers
2k views

How can you compute Itō Integrals with Mathematica?

How can you compute Itō Integrals with Mathematica? I tried searching through the documentations but I didn't find anything. P.S. I was not at all sure how to tag this question. I had to put in at ...
11
votes
2answers
3k views

How to specify assumptions before evaluation?

If I request mathematica evaluate an integral for me, I'll often get a more general ConditionalExpression than I want. Example : ...
11
votes
1answer
644 views

Plot showing discontinuity where it shouldn't

I was trying to integrate a continuous function with a kink and I did it two ways and both ways the plot of the result shows a discontinuity. I also later want to differentiate the Integrated ...
11
votes
1answer
499 views

Incorrect results for elementary integrals when using Integrate

There is a rather simple integral ($K_0$ is the 0-th order MacDonald function) $$\int_0^\infty e^{-x \cosh\xi}\, d\xi = K_0(x)$$ which mathematica cannot solve. This even though the documentation ...
11
votes
1answer
167 views

Keeping Integrate from making unnecessary assumptions

I would like to evaluate the integral $\int_{-\infty}^\infty \mathrm{d}x \, \exp\left(- a x^2 - x^4\right)$ for any real value of $a$. Mathematica 8.0.4 gives the following result: ...
11
votes
0answers
157 views

Why does Mathematica choose branches as it does in this situation?

Consider these integrals: ...
10
votes
5answers
466 views

Double series over primes

I'm very curious if the following double series over primes has a closed form: $$\sum_{k \in \mathcal{P}}\sum_{n \in \mathcal{P}}\frac{1}{k\;n(k+n)^2}$$ where $\mathcal{P}$ denotes the set of all ...
10
votes
2answers
527 views

Derivative from the left and right

I am currently trying to write a script that takes a curve $C$, a starting point $p$ and a direction vector $\vec{v}$ and calculates the path of a beam starting at $p$ in direction $\vec{v}$ when it ...
10
votes
5answers
3k views

Finding the centroid of the area between two curves

When I have an area bounded by curves, is there a built-in way to find the center of the area? Or do I have to plot it first and then use ComponentMeasurements on ...
10
votes
1answer
317 views

Why does Mathematica return a Fourier transform for a function for which it is not defined?

The following function $$g(x) = (1 + x^{1/a} )^a $$ should NOT have a Fourier transform, as far as I am aware, for any real values of $a$ since $g(x)$ is not nice in the sense of decays quickly ...
10
votes
2answers
747 views

Maximizing a function with assumptions

Using f[s_] := Log[(s/r)^α ((α - 2) n0 r^α + 2 π Pmax ρ r^2) /((α - 2) n0 s^α + 2 π Pmax ρ s^2)]/s When I run the following line: ...
10
votes
2answers
516 views

Numerical partial derivative

For a one-variable numerical function, it's simple to calculate the derivative at a point with Derivative as Szabolcs has pointed out before: ...
9
votes
4answers
920 views

Plot a 2D vector path onto a surface

In my calculus 3 course, we're studying gradients and have a project that takes a combination of 3D Gaussian radial surfaces and a basic parametric path $r(t) = \{x(t),y(t)\}$ to see how the gradient ...
9
votes
4answers
4k views

Finding critical points of a function

Let's say we'd like to find the critical points of the function $f(x)=\sqrt{x-x^2}$. Finding out where the derivative is 0 is straightforward with Reduce: ...
9
votes
3answers
4k views

Finding unit tangent, normal, and binormal vectors for a given r(t)

For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. I've got Mathematica, but I've never used it before and I'm not sure how to coerce ...
9
votes
3answers
379 views

Different results for integration using Mathematica and MATLAB

I have the following integration: $$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$ I get different ...
9
votes
2answers
443 views

Find closed form expression for series expansion coefficients [duplicate]

Is there a built-in function that will find a general expression for the coefficient of the series expansion of a function? Series will only give the explicit ...
9
votes
4answers
235 views

No response to an infinite limit

Trying to compute this limit, things seem to get frozen, even for hours. What would you recommend to fastly compute it? ...
9
votes
2answers
407 views

Problem with numerical evaluation of analytically solved integral, solution way off

The following command in Version 9.0.1: N[Integrate[x^50*Sin[x], {x, 0, 1}]] gives $1.4615\times 10^{48}$ which is way off from the correct solution which is ...
9
votes
2answers
277 views

Recursive Integral for Volume of $n$-Ball

The volume of an $n$-ball (the $(n+1)$-dimensional analogue of a disk) of radius $r$ can be found by the following integral recurrence: $$V_0(r)=2r$$ ...
9
votes
1answer
238 views

Mathematica: computing a difficult integral

I am trying to compute the following integral: Integrate[Exp[Sum[-((cw λ - b[i])^2/(2 σ^2)), {i, 1, n}]], {cw, 0, 1}] And currently Mathematica outputs ...
9
votes
1answer
280 views

Is it possible to find a limit of a sequence given by its recurrence relation?

I need to calculate a limit of a sequence given by its recurrence relation. I tried the following: ...
9
votes
1answer
179 views

How to calculate this integral? Integrate[BesselJ[0, x - BesselJZero[0, 1]]/x, {x, -Infinity, Infinity}]

I tried to calculate the following integral, but it returned unevaluated. ...