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
2answers
947 views

Integration with vector coefficients

I asked this same question in Mathematics, and it was suggested I might try here. I'm more comfortable with Maple, but if I can get Mathematica to do what I'm after, so much the better. Basically ...
7
votes
1answer
124 views

How to calculate residues using different branches of the logarithm

My goal is to be able to compute the residues of something like $z^{\alpha} R(z)$ where $0 < \alpha < 1$, $R(z)$ is rational, and the exponential can be chosen with any branch. I found a way to ...
7
votes
2answers
541 views

Integrating a function over a surface integral

From a first principles bandstructure calculation I get an energy scalar field in three dimensions $E(x,y,z)$. It's now easy to plot a constant energy (contour)-surface for dedicated values ...
7
votes
2answers
909 views

Mathematica 10 cannot solve definite integral [duplicate]

Bug introduced in 10.0 and fixed in 10.0.2 Mathematica 10 fails to solve the following integral, saying that it does not converge. ...
7
votes
1answer
95 views

Inconsistent results for Integrate depending on irrelevant assumptions

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

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

Mathematica can't find a solution to this Expectation. ...
7
votes
1answer
197 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
305 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
633 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
75 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
3answers
359 views

How to do algebra on unevaluated integrals?

I am working with functions calculated from a set of general basis functions. ...
6
votes
3answers
828 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
299 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
459 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
230 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
3answers
385 views

Integrate to calculate enclosed area

I am trying to 'use an integral in polar coordinates to calculate the area enclosed by this curve': The curve is: r=sin2θ, θ ∈ [0, π] which I believe is already in ...
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
363 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
397 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
399 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
245 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
505 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
372 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
299 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
111 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
209 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
323 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
198 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
355 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
415 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
280 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
1answer
143 views

Strange DiracDelta integration results in 10.4.1

Integrate[DiracDelta[s (x - c)] x, {x, -Infinity, Infinity}, Assumptions -> {s > 0, c > 0}] gives me c/s in ...
6
votes
2answers
176 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
89 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
249 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
246 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
137 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
114 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
264 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
230 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,$$ ...