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.

Filter by
Sorted by
Tagged with
76 votes
5 answers
26k 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 \nabla)...
matheorem's user avatar
  • 16.9k
58 votes
6 answers
6k 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 ...
scallionpancake's user avatar
53 votes
1 answer
13k views

How to visualize Riemann surfaces?

In WolframAlpha we can easily visualize Riemann surfaces of arbitrary functions, can we plot the Riemann surface of an arbitrary function using Mathematica and ...
xslittlegrass's user avatar
45 votes
2 answers
23k 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?
user64494's user avatar
  • 23.2k
42 votes
2 answers
1k views

Why does Mathematica report that $\int_1^\infty\frac{\sin(\sqrt{x})}{\sqrt{x}}dx$ = $2\cos(1)$?

Bug introduced in 7.0 or earlier and fixed in 11.0 Mathematica 10 gives the following very odd result, Integrate[Sin[Sqrt[x]]/Sqrt[x], {x, 1, ∞}] (* 2 Cos[1] *) ...
JEM's user avatar
  • 1,147
40 votes
4 answers
2k views

Some indefinite integrals evaluate in 11.2 but not in 11.3 - what can be done?

Bug introduced in 11.3 and fixed in 12.0.0 Reported to Wolfram: [CASE:4032137] These integrals evaluate in version 11.2 on windows but when I tried them under version 11.3 they returned unevaluated.,...
Nasser's user avatar
  • 135k
40 votes
2 answers
2k views

Bug in mathematica analytic integration?

Bug introduced in 9.0 or earlier and fixed in 13.0 or earlier I found Mathematica provides me a wrong answer for a relatively simple analytically solvable integral: ...
Collector's user avatar
  • 503
39 votes
1 answer
998 views

How to augment the realm of functions Mathematica thinks it knows how to integrate symbolically

My question involves extending the functionality of Integrate over specific integrals in the most generic manner. Specifically, is it possible to "hack into" ...
chris's user avatar
  • 22.5k
38 votes
6 answers
2k views

Finding length of intersection of two surfaces

I would like to know how we find the length of the intersection of two surfaces. For instance, in the following example,a surface intersects with a plane: How do we find the length of intersection ...
Bryan Shih's user avatar
36 votes
1 answer
2k views

Mathematica 9 cannot solve this Integral. Mathematica 8 could. Is this a bug?

I was trying to (re)calculate a problem of an older Wolfram blog post (Problem 11457, by M. L. Glasser) with Mathematica 9.0.0.0 (on OS X 10.8.2). ...
Norbert Fabritius's user avatar
35 votes
4 answers
10k views

Usage of Assuming for Integration

For some reason, when I enter the following integration in Mathematica Assuming[{k ∈ Integers}, Integrate[ Exp[ I k t], {t, -π, π}]] the result turns out to be 0....
TriSSSe's user avatar
  • 523
34 votes
2 answers
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 ...
Dr. belisarius's user avatar
33 votes
4 answers
26k 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)} f(x,y)=\lim_{(x,0)\...
Dominic Michaelis's user avatar
32 votes
4 answers
26k 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 ...
a98's user avatar
  • 423
32 votes
5 answers
14k views

How can I differentiate numerically?

Mathematica has two ways to integrate: Integrate and NIntegrate. But what about D? ...
lachis83's user avatar
  • 1,599
32 votes
3 answers
6k 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, ...
simpler's user avatar
  • 321
31 votes
4 answers
7k 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?
Anixx's user avatar
  • 3,473
31 votes
4 answers
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 ...
yode's user avatar
  • 26.1k
30 votes
4 answers
13k 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 ...
Mr.Wizard's user avatar
  • 269k
29 votes
2 answers
6k 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 ...
user6818's user avatar
  • 1,151
29 votes
3 answers
5k 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. ...
Emerson's user avatar
  • 1,197
29 votes
3 answers
28k views

Quick Hessian matrix and gradient calculation?

I am absolutely new to Mathematica and I actually want to try implementing a little optimization method . Long story short assuming I have a predefined two-variable function f(x,y) I want to ...
Pranas's user avatar
  • 399
29 votes
1 answer
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 ...
Nasser's user avatar
  • 135k
28 votes
1 answer
2k views

Undocumented use of Integrate: Integrating over regions

I have come across a few questions asking about integrating over regions. And while the answers are impressive there should be a better more consistent way. So my question is, are there ways, ...
RunnyKine's user avatar
  • 32.9k
28 votes
3 answers
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 ...
Carlo Beenakker's user avatar
27 votes
4 answers
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 ...
numbermaniac's user avatar
27 votes
4 answers
1k 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 h^2\right)^2}...
Kagaratsch's user avatar
  • 11.9k
27 votes
3 answers
7k views

Visualizing a Complex Vector Field near Poles

I've been playing around with a visualization technique for complex functions where one views the function $f: \mathbb{C} \rightarrow \mathbb{C}$ as the vector field $f: \mathbb{R^2} \rightarrow \...
Jackson Walters's user avatar
27 votes
2 answers
486 views

Bug in ArcLength?

fixed in 10.1 (windows) With Mathematica 10.0.2: ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]] ArcLength[Line[{{0}, {1}, {2}}]] (* 2 *) (* 2 *) However, ...
qwerty's user avatar
  • 1,189
27 votes
1 answer
518 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: ...
Mike's user avatar
  • 371
25 votes
3 answers
583 views

Backslide of Limit

Backslide introduced in 9.0, and persisting through 12.0. A friend of mine showed me this example: Limit[Sum[Sin[Pi*k/n]/(n + 1/k), {k, 1, n}], n -> Infinity] ...
xzczd's user avatar
  • 62.8k
24 votes
5 answers
934 views

Heuristics, tricks, and hacks in symbolic math

Mathematica sometimes fails to compute symbolic solutions when posed in the direct or obvious code, but succeeds when the same fundamental problem is posed in a slightly different way, or when ...
David G. Stork's user avatar
23 votes
5 answers
6k views

Why this real integral yields imaginary results?

This integral yields -1-4Iπ/3 in Mathematica: Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y), {x,0,1}, {y, 0, 1}] Since ...
atbug's user avatar
  • 685
23 votes
3 answers
2k 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. ...
ybeltukov's user avatar
  • 43.5k
23 votes
1 answer
1k views

Implement fractional Laplacian

What is a way to implement the Fractional Laplacian with Mathematica? How can we apply such implementation to numerically solve the problem $$(-\Delta)^su = 1 \text{ in } B_1(0), \\ u = 0 \text{ in ...
user avatar
23 votes
2 answers
4k 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 ...
Yaroslav Bulatov's user avatar
23 votes
2 answers
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 ...
Nothingtoseehere's user avatar
23 votes
1 answer
791 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 ...
Lior Blech's user avatar
23 votes
2 answers
910 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$$ ...
Kevin Driscoll's user avatar
22 votes
2 answers
2k views

Incorrect results for elementary integrals when using Integrate

Bug introduced in 8.0 or earlier and persisting through 13.2 or later 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)$$ ...
Fabian's user avatar
  • 1,424
22 votes
2 answers
854 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 ...
Kuba's user avatar
  • 136k
22 votes
2 answers
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: ...
JT_NL's user avatar
  • 983
21 votes
5 answers
15k views

How to do implicit differentiation in Mathematica?

I have an equation which is K^(1/2)*L^(1/2)-(K+L) = 24 but I don't know how to do implicit differentiation to find dK/dL because I only know how to do the normal ...
Brittany's user avatar
  • 211
21 votes
5 answers
15k 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, ...
Red Banana's user avatar
  • 5,121
21 votes
3 answers
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 ...
Logan's user avatar
  • 517
21 votes
4 answers
515 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. ...
bobbym's user avatar
  • 2,618
21 votes
1 answer
6k 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 ...
The-Ever-Kid's user avatar
  • 1,089
21 votes
1 answer
1k views

Solver for COVID-19 epidemic model with the Caputo fractional derivatives

As it is known in biological system with memory it would be suitable to use fractional derivatives to describe evolution of the system. In a current version of Mathematica 12.1 there is no special ...
Alex Trounev's user avatar
  • 41.1k
21 votes
1 answer
1k views

Dual complex integral over implicit path using contour plot

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$$ ...
chris's user avatar
  • 22.5k
20 votes
2 answers
7k views

How to make traditional output for derivatives

Hello again after some pause. i have a problem how to present partial derivatives in traditional form, not as Mathematica gave it to me in its notation. So I want to present this ...
Pipe's user avatar
  • 1,099

1
2 3 4 5
98