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)

7
votes
1answer
92 views

Inconsistent results for Integrate depending on irrelevant assumptions

I stumbled across this amusing issue today when doing some definite integrals: ...
7
votes
4answers
415 views

Conditional Expectation — How can Mathematica find a more general closed form?

Mathematica can't find a solution to this Expectation. ...
7
votes
1answer
194 views

Why should the spatial derivative order of the ODE *not* exceed two?

Following this question I came across this strange behaviour. Let me define a 1 D interval implicitely ...
7
votes
1answer
192 views

Differentiate the product of some terms

How can I compute the following derivative, $$ \frac{\partial}{\partial \lambda_j} \prod_{i=1}^k (1+\lambda_i)e^{\lambda_i} \quad \text{for }\; 1\le j \le k $$ for some positive integer $k$ which is ...
7
votes
2answers
295 views

Fundamental Theorem of Calculus for definite integrals… assume continuity?

So here's the problem: I can evaluate the indefinite integral: Integrate[D[u[x], x], x] u[x] However, I'd like to ...
7
votes
1answer
630 views

Integrating over Bessel Function erroreous? (Hankel Transform)

Bug introduced in 8.0.4 or earlier and persists through 10.2. The Hankel Transform is given by Integrate[f[x] x BesselJ[0, x t], {x, 0, Infinity}] It is ...
7
votes
1answer
74 views

When is RegionMeasure[ImplicitRegion[…]] faster than (N)Integrate[Boole[…]]?

I wanted to use Mathematica to compute areas and volumes of various implicitly defined regions, so I ran a simple test case using the unit circle: ...
7
votes
0answers
189 views

Incorrect evaluation for Thue-Morse signed harmonic series

I would like to evaluate $$s = 1 - \frac{1}{2} - \frac{1}{3} + \frac{1}{4} - \frac{1}{5} + \frac{1}{6}+\frac{1}{7}-\frac{1}{8} - ... + \frac{(-1)^{\textrm{binary digit sum}(n-1)}}{n} + ... $$ where ...
6
votes
5answers
2k views

Find function inverse

I'm trying to find the inverse of a function: (30*x^2 (1 - x)^2) (* where 0<x<1 *) I tried all the following options: 1. ...
6
votes
3answers
354 views

How to do algebra on unevaluated integrals?

I am working with functions calculated from a set of general basis functions. ...
6
votes
2answers
158 views

Sets and sums of different elements

Consider the set S={w,x,y,z}. If the set of all possible sums of any three different elements from S is {-1,3,5,8}, then what is the set S? How could I solve this function using Mathematica?
6
votes
3answers
812 views

Why does Mathematica spit this back out?

I'm struggling with the integral, $$\iint\sqrt{4a^2-x^2-y^2}dxdy$$ taken over the upper half disk of radius a centered at (a, 0). When I type it into Mathematica (10.2), Mathematica spits it back ...
6
votes
3answers
295 views

Derivative of contour in ContourPlot

Sorry to bring this question up again, since there are many similar questions on the site. I use to think this is a easy job to do, because for the worst case I can follow the answers on this site. ...
6
votes
2answers
449 views

Convolve does not get the correct answer

Convolve[Sinc[x], Exp[-x^2], x, X] (* E^-X^2 π *) is obviously false, but why? Any suggestions ?
6
votes
4answers
229 views

Limit of partial sums involving inverse squares

Consider the finite sum rs[x_, n_] := x/n Sum[n^2/(i + (n - i) x)^2, {i, 1, n}] Is there a way to bring Mathematica to calculate the limit for ...
6
votes
1answer
1k views

How to expand a function into a power series with negative powers?

Is there any way to expand this expression a+b(1-Exp[-T/(b c)]/(z-Exp[-T/ (b c)]) (where a, ...
6
votes
2answers
2k views

How to find the non-differentiable point(s) of a given continuous function?

For example, the non-differentiable point of the function $f(x)=|x|$ is at $x=0$. How to find the non-differentiable points of a continuous function that is defined numerically?
6
votes
2answers
360 views

Force integration to be linear over sum?

Is there an obvious way to force Mathematica to separately integrate the terms in a sum? According to the docs, When part of a sum cannot be integrated explicitly, the whole sum will stay ...
6
votes
1answer
396 views

What is the mathematical meaning behind D[f]?

y = a + b x; I can understand this output of the ordinary differentiation of y w.r.t. x ...
6
votes
1answer
357 views

How do I compute the entropy of the beta distribution?

I tried Expectation[-q*Log[q], q \[Distributed] BetaDistribution[a, b]] and got ...
6
votes
2answers
2k views

Can I define a function for vectors of arbitrary dimension?

Is it possible to do analytic calculations with Mathematica? For example, I want to compute: $$\partial \frac{\sum_{j=1}^n G_{j} \prod_{k=1}^{j-1} (1 - G_{k})}{\partial G_l}=-\prod_{k\neq l} ...
6
votes
2answers
240 views

Curvature Application

I found these amazing animations at https://courses.engr.illinois.edu/tam212/avt.xhtml#avt which I think will be wonderfully useful when teaching multivariable calculus next semester. I've started to ...
6
votes
1answer
477 views

Lagrange Multiplier

We are asked to maximize and minimize $f(x,y)=4xy$, given the constraint $4x^2+y^2=8$, using the Lagrange Multiplier method. First, I enter the functions f and g. ...
6
votes
1answer
370 views

How to solve this probability symbolically or numerically?

I am trying to calculate the following probability $$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big)$$ where, $$A_i \sim \exp(\lambda), \quad S_i \sim ...
6
votes
2answers
295 views

An integral with a fractional part in 3 dimensions

The evaluation with Maple suggests the triple integral is around $1$, but Mathematica tells it's $0.0958758$. When using the code ...
6
votes
1answer
104 views

Animate the line integral over a scalar field

There is a gif from Wikipedia, The line integral over a scalar field $f$. How to plot and animate this in Mathematica?
6
votes
3answers
205 views

Speed up derivative evaluation

I'm trying to calculate the normal vectors and the tangent vectors at the discrete points of a suface. For example: ...
6
votes
1answer
320 views

Find exponential generating function from the first few terms

The function FindGeneratingFunction computes the ordinary generating function of a sequence, given a sufficient number of initial terms. I have two questions in ...
6
votes
4answers
1k views

Can't compute definite integral

Consider a scalar field (in polar co-ordinates), $f(r) = l-r$. Now I want to evaluate the field integral over a circular region of radius $b$, centered at a distance of $x$ from the origin. According ...
6
votes
1answer
192 views

Defining a function implicitly and calculating its derivatives

I'm interested in using Mathematica's symbolic manipulation to obtain, for a particular function $f$, derivatives of arbitrary order evaluated at zero. Normally I'd use the ...
6
votes
2answers
190 views

Series resulting in “No more memory available.”

Is there any way to force Mathematica to come up with the closed form to Sum[1/(i^18 (i^2 + j^2)), {i, 1, Infinity}, {j, 1, Infinity}] or ...
6
votes
3answers
345 views

Using Grad, Div, etc in polar coordinates

I'm trying to use the newish functions Grad and Div to work with a PDE with circular or spherical symmetry and getting what looks to me like a wrong result. However, I'm not sure of this--perhaps I ...
6
votes
2answers
390 views

Is there a built-in function which detects singularities in a function?

Given a function f[x] and a region M in the complex x-plane, how can I find singularities of f in this region, i.e., issue a ...
6
votes
1answer
260 views

Traces of the level surface $z=4x^2+y^2$

I came up with this method to plot the traces of the surface $z=4x^2+y^2$, in this case for $z=1$, 2, 3, and 4. ...
6
votes
1answer
210 views

Working with a system of differential equations that cannot be solved explicitly

I have to work a lot with three functions $\;o_1(t), o_2(t), o_3(t)\;$ that are solutions to the certain system of differential equations: ...
6
votes
1answer
99 views

Is it possible to find a function from first few terms in the expansion

Is it possible to find a function if first few terms of the expansion is known. For example if I have this series $f(x)=\frac{k^3 x^2}{6}-\frac{k^5 x^4}{120}+\frac{k^7 x^6}{5040}-\frac{k^9 ...
6
votes
1answer
1k views

Convolving/integrating problems

Let's say I want to convolve two functions (f and g), a gaussian with a breit-wigner: ...
6
votes
2answers
171 views

Probability of distance of two random points in the unit circle

Inspired by the problem solve this probability problem symbolically which I have already generalized there I'd like to ask here the same question for a unit circle. More precisely: given two randomly ...
6
votes
1answer
86 views

How correctly use WhenEvent to detect when gradient is over a certain value?

So I wish to stop integrating my PDE when the spatial gradient is larger than some value, let's say 10. That is to say, my WhenEvent condition wants to be stop when the the maximum gradient over all x ...
6
votes
1answer
246 views

Solving $\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$

I would like to solve the following equation: $\frac{dx}{dt} = A \frac{ (1-x)}{(t-t^2)} - \frac{(B*x -C*x^2)}{(t-t^2 )*(t-x)}$ I have already posted it here, but still it doesn't work for me (I ...
6
votes
1answer
244 views

Incorrect evaluation of integral involving a DiracDelta, whose argument has infinitely many zeros

Let's say $X>0$ is a random variable with probability density $p_X(x)={\rm e}^{-x}$. Define the random variable $Y=\sin(X)$. From the transformation theorem for probabilities we know that its ...
6
votes
1answer
135 views

Is it possible to circumvent a bug inside SeriesCoefficient?

As far as I can tell, there seems to be a bug in SeriesCoefficient: ...
6
votes
2answers
1k views

Algorithm for parts integration

Sorry if this is a duplicate, I've searched how to do this to no avail. What I'd like to do is a function that integrates by parts $n$ times, i.e $$ \int u(x) v(x) dx = u ...
6
votes
1answer
113 views

Examining the function $f(x,y)=xy(x^2-y^2)/(x^2+y^2)$

Consider the function $$f(x,y)=\begin{cases} xy\dfrac{x^2-y^2}{x^2+y^2},&(x,y)\ne(0,0)\\ 0,&(x,y)=(0,0) \end{cases}$$ I can show that $f_x(0,0)=f_y(0,0)=0$. ...
6
votes
1answer
261 views

Integral of x^p

Can anyone explain why Mathematica does not return a conditional expression that handles the case of p=-1 for Integrate[x^p,x]? ...
6
votes
1answer
227 views

Confirming conservation laws for complex valued functions

Consider the nonlinear Schrödinger equation (I would like to do this for a more complicated set of equations, but to gain understanding I'll consider this simplified case) $$A_t+iA_{xx}+i|A|^2A =0,$$ ...
6
votes
1answer
169 views

Symbolic integration of elliptic functions

Is there a clever way to integrate products of elliptic functions like $\wp(z;g_2,g_3)$ or $\zeta(z;g_2,g_3)$ in Mathematica? Mathematica seems to be able to integrate functions like ...
6
votes
3answers
278 views

Calculate integral for arbitrary parameter n in infinite square well problem

I'm continuing[1,2] the study of an infinite square well in the context of quantum mechanics. Ultimate goal is to calculate the product $\Delta x\Delta k$, for various eigenstates, that is for ...
6
votes
1answer
116 views

Unexpected Behavior from Integrate with PrincipalValue -> True

Bug introduced in 9.0 or earlier and persisting through 10.3 or later The following code, taken from my answer to 97024, ...
6
votes
1answer
171 views

How to do automatic differentiation?

Does Mathematica have any AD functionality or does it only support symbolic differentiation? If not, are there any packages or other third party implementations available? Edit (J. M.) Here is an ...