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 (3)

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
4answers
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
774 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 ...
18
votes
2answers
268 views

Negative probability?

I am trying to get the sum of the squares of seven random variables, all uniformly distributed. This is what I tried. ...
18
votes
0answers
195 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: ...
17
votes
2answers
225 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: ...
17
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. ...
17
votes
1answer
367 views

Incorrect result from Integrate

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

Have I found a bug in Integrate?

The following command gives 0 in Mathematica 9.0.1. ...
16
votes
2answers
812 views

Bug in mathematica analytic integration?

I found Mathematica provides me a wrong answer for a relatively simple analytically solvable integral: ...
16
votes
1answer
699 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
4k 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
411 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
291 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 ...
14
votes
2answers
1k 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
1answer
289 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
721 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
806 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
329 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
648 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
773 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
392 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
248 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: ...
13
votes
1answer
292 views

Extra factors appear when evaluating Euler integrals

Note: this is fixed in version 9. When I perform the double integral in Mathematica, Integrate[(x (1 - x))^z (y (1 - y))^z, {x, 0, 1}, {y, 0, 1}] which ...
13
votes
1answer
318 views

Why does Mathematica give an incorrect answer to this multiple integral?

This is not a new problem but I would like to understand why Mathematica gives the result that it does. (Volume of a hypersphere) ...
12
votes
2answers
695 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 ...
12
votes
1answer
732 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 ...
12
votes
1answer
513 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 ...
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
2answers
637 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: ...
11
votes
4answers
5k 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
492 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
410 views

Determine frequency of oscillations

I am wondering how I could determine the frequency of oscillations of a differential model equation? How could I find the frequency from this example given in Mathematica Documentation: ...
11
votes
3answers
187 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
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
4k 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
170 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
177 views

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

Consider these integrals: ...
10
votes
5answers
492 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
6answers
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
2answers
2k views

How to calculate contour integrals with Mathematica?

How to calculate the integral of $\frac{1}{\sqrt{4 z^2 + 4 z + 3}}$ over the unit circle counterclockwise for each branch of the integrand?
10
votes
2answers
545 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
1answer
350 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
861 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: ...
9
votes
4answers
1k 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
5k 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
510 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
494 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
3answers
2k views

Multivariable Taylor expansion does not work as expected

The basic multivariable Taylor expansion formula around a point is as follows: $$ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac{1}{2!}(\mathbf a \cdot ...