# Questions tagged [calculus-and-analysis]

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

4,198 questions
Filter by
Sorted by
Tagged with
23k views

1k views

### Symbolic derivatives are being calculated numerically

Update: (1) By V11, not sure of the exact version, the derivative IntegerPart' has been given a symbolic definition. (2) The numeric derivative computed has changed ...
• 114k
6k 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?
• 2,721
1k views

### Is it possible to write a MMA version of LineInt like Maple?

When I asked this question I found that the available answers relied heavily on the official RegionConvert, but which is very weak at that time. Now, We have a more ...
• 23.2k
12k views

### Implementing discrete and continuous Hilbert transforms

What is an efficient and accurate Mathematica implementation of the Hilbert transform, for both continuous and especially discretely sampled functions? This transform relates phase and amplitude in ...
• 264k
5k 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, ...
• 291
517 views

### many indefinite integrals do not evaluate in 10.1, looking for the cause

Bug introduced in 10.1 and fixed in 10.2 Many integrals no longer evaluate in V 10.1 when they did in 10.0.2 Here are some 23 integrals as an example, that all produced results in V 10.0.2, but now ...
• 108k
5k views

### How does Mathematica understand branchcuts of the complex logarithm?

Say I have the function $f(x) = x \tanh(\pi x) \log (x^2 +a^2)$ where $a$ is some positive real number. Then it seems to be me that Mathematica when given such a ...
• 1,121
4k 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. ...
• 1,147
2k views

### Symbolic integration error

fixed in 10.1 (windows) I'm running Mathematica 10.0.0 and encountered a disturbing error in the symbolic integration of a rather simple function ...
3k views

### Is it possible to get this 'nicer' solution for an integral from Mathematica?

On a recent CAS-enabled exam question a few weeks ago I was required to evaluate the following integral: $$\int_0^5\left(\sqrt[3]{125-x^3}\right)^2\,dx$$ In Mathematica, using the ...
• 607
1k views

1k 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 ...
• 4,370
885 views

### Integrate returns imaginary answer for smooth, real function

Bug introduced in 7 or earlier and persisting through 12.0.0.0 or later I'm trying to evaluate the integral: $$\int_0^{\infty} \frac{1}{4 b \sqrt{\pi} r} e^{-(b-r)^2}(e^{4 b r} - 1) \mathrm{d}r$$ ...
777 views

### Derivative of a pure function with SlotSequence

I can live with this but I can't figure out why the following is 0: Derivative[1][f[##] &][x] 0 From documentation for ...
• 132k
717 views

### Teaching Mathematica more about DiracDelta and KroneckerDelta

As the documentation and some experimentation indicates, Mathematica contains little information about representations of the DiracDelta and ...
• 802
14k 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, ...
• 4,801
10k 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 ...
• 517
2k 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 ...
• 1,414
2k views

### Why does Mathematica give the wrong answer when integrating?

Bug introduced in 8.0 or earlier and fixed in 9.0.0 I integrate Integrate[Exp[I Cos[b - c]] Cos[b], {b, 0, 2 Pi}] Mathematica gives: ...
• 973
503 views

### Negative probability?

Bug introduced in 9.0.1 and fixed in 10.0.2 I am trying to get the sum of the squares of seven random variables, all uniformly distributed. This is what I tried. ...
• 2,618
3k views

### Differentiating functions of vectors/matrices?

I'm dealing with derivatives of scalar functions of matrices and wondering if Mathematica can help me here. The standard approach of expanding it in terms of components is cumbersome. As an ...
• 5,679
1k views

### How to efficiently find moments of a multinormal distribution?

Update: Starting from V10.0 the build-in Moment is fast enough for practical use. I have a multinormal distribution with covariance matrix $\sigma$ and zero mean. ...
• 42.8k
8k views

### Derivative of real functions including Re and Im

When deriving functions using Re, Im or Arg (and probably some other functions as well), ...
• 18.8k
3k 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.
• 203
5k 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 ...
• 1,079
1k views

### Incorrect result from Integrate

Bug introduced in 8.0 and fixed in 10.0 I attempted to calculate the following integral: ...
• 11.7k
378 views

### Mathematica v12 Integration bug?

Bug introduced in 12.0 and fixed in 12.1 After upgrading to mathematica 12, this integral gives the wrong result, also with other types of similar integrals. ...
• 551
Context I am interested in doing double contour integral over paths which are defined implicitly. For the sake of debugging, let's assume its $$\oint_{\cal C}\oint_{\cal C} \frac{1}{u\, x} d u d x$$ ...