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.

5,173 questions
Filter by
Sorted by
Tagged with
75 views

235 views

Incorrect result for Integrate[] over Region

I was doing a calculation that involved integrating rational functions over a triangular region, and eventually noticed some of my results didn't make any sense. After some investigating, I was able ...
100 views

Replicating Complex Plot (branch cuts, poles, shading)

I am trying to recreate the following 2 plots: where the function being plotted is $|e^{2ipR}S_0^{\text{well}}(p)|$ where $|...|$ is the absolute value, $R=1$, and $S_0^{\text{well}}(p)$ is given as \...
1 vote
187 views

Can't integrate a highly oscillatory integrand

I have a long formula ...
1 vote
143 views

I want to plot the group delay of the following mathematica code but it takes too long time

I am working on a Mathematica project where I want to plot the group delay. The problem is this code is running too slow. Is there any possibility of speeding up the code? Here is the original code: <...
200 views

Evaluation leak in Derivative[]

Bug introduced in 4, persisting through 14.1. I usually only report bugs, but in this case, two reason prompted me to post this: Given that derivatives are computed internally by various commands, ...
1 vote
1k views

Calculation of an integral with a Bessel function

How can I calculate below integral? Is it possible to calculate it in Mathematica? If yes, how? Am I doing something wrong? ...
64 views

How to represent arithmetic operations (addition, subtraction, multiplication, and division) in column form?

Can Mathematica generate the vertical format for arithmetic operations such as addition, subtraction, multiplication, and division?
2k views

How to do matrix calculus in Mathematica?

I would like to differentiate Ax with respect to A where A is a matrix. Now, obviously, I know the derivative is x but for more nasty expressions, is there a way to differentiate expressions with ...
63 views

Same integral giving different results

I am trying to solve the following integral using Mathematica $\int_{0}^1 dz \int_{0}^{1} dz' \exp(-k|z-z'|)\cos[\pi p z] \cos[\pi q z]$, with $p,q\in \mathbb{Z}$. To do so, I am doing the following: <...
113 views

Poincare section keeps running without giving results

I am trying to find the Poincare section as given in Figure 7 of this paper. This is the code that I am using for it: ...
1 vote
54 views

How to Solve Partial Derivative with Summation (for Linear Regression)?

I'm demonstrating linear regression so I would like to calculate derivatives 1 & 2 using Mathematica, something like this This is based on the textbook notation in Johnston's Econometric Methods ...
1 vote
62 views

How can I speed up symbolic integration of this highly oscillatory function?

I am trying to figure out how to speed up this symbolic integration. I have tried parallelization and numerical integration (both I am failing to implement). Here is the function: ...
28 views

How to put prime before value during a substitution?

Here is a sample Mathematica code: ...
155 views

Unexpected behavior of SetDelayed and Derivative

Let A = x^2 and define a function f[x_] := A Computing D[f[x],x] gives ...
354 views

An integral using Mathematica or otherwise

Consider the unit square integral $$I=\int_{(0,1)^5}\frac{x(1-x)y(1-y)u(1-u)v(1-v)w(1-w)}{(1-(1-xyuv)w)^2}\ dxdydudvdw$$ Using Mathematica or otherwise I need a closed form of I, possibly in terms of ...
97 views

Many contradictory results for a single integral

I am interested in solving the integral $$\int_{\mathbb{R}} dx \frac{e^{i a x^2}}{(x - b - ic)^d(x - b + ic)^d}$$ for $a,b,c \in \mathbb{R}$ and $d \in \mathbb{N}$. As an early step, I have asked ...
139 views

Incorrect limit involving hyperbolic Kepler equations

I’m trying to work with the Kepler equations for a hyperbolic trajectory in the case of a repulsive force (see Wikipedia for the attractive case). The trajectory can be described by the right branch ...
115 views

Comparing simplification result by Mathematica with Maple [closed]

I use both Maple and Mathematica. Was porting small code from Maple to Mathematica. In one small computation I noticed this very strange difference and is really serious difference which can affect ...
114 views

LaplaceTransform and DSolve handles PDE well in version 14, but not in 13.3

I'm facing an error when trying to solve a simple Laplace-transformed PDE with one basic boundary condition, followed by applying the InverseLaplaceTransform. The ...
109 views

How we can apply a pure function for dot and prime

I want to apply a pure function. If Y[t,r] How can I replace the derivative of Y with respect to ...
69 views

FilledPolarCurve: Area and Integrate give different values

Version 14.1 introduces FilledPolarCurve as a new way to make regions. In some cases, Area and integrating 1 over the region give different values for the region's area. Is this a bug? Example: ...
53 views

Parametric differential equations

I'm totally beginner in Wolfram. And I trying to do some research. If it's not difficult for you, please help me. I have a system of three differential equations with four parameters: beta, delta, p, ...
31 views

How do I display my output as a complex number with decimals for the real and imaginary components? [closed]

This is my code: c=Integrate[t/(E^t-1),{t,-Pi,Pi}]/(2Pi) a[j_]:=Integrate[t*Cos[j*t]/(E^t-1),{t,-Pi,Pi}]...
1 vote
60 views

2-loop diagrams dimensional regularization with Feyncalc

I attempted to evaluate the following diagram using FeynCalc, following the method outlined by Pierre Ramond in his QFT book, but I encountered difficulties: \Sigma(p)=\frac{\lambda^2\...
64 views

Help dsolve obtain this solution to standard second order ode with missing x and y

Could someone find a smart way to help DSolve solve this second order standard ode? This is second order nonlinear ode with missing $x$ and missing $y$. ...
122 views

I have a error on my code but I can't find it!

I have a problem by my code I can't find it yet!! ...
47 views

NDSolve for non-linear Poisson equation: the case of a pn diode

I am solving the physical problem of a pn diode under no bias voltage. This involves solving a rather 'complicated' non-linear Poisson's equation in 1D -\frac{\partial^2\phi(z)}{\...
1 vote
1k views

Integration of linked PDFs over probability simplex

I'm trying to integrate the following expression: f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4] Where ...
1 vote
364 views

Incorrect results of DSolve

Finding a fundamental solution of a certain linear partial differential operator, I try ...
1 vote
150 views

How to find the local maximum and minimum of a function

I am trying to find the local maximum and minimum of a function. The code below works if function is an exponential but when function involves a sinusoid, it does not give numerical values and instead ...
139 views

Uncaught SystemException returned to top level calling integrate in V 14.1

Report to WRI [CASE:5169570] May be someone with better debugging skills than me in Mathematica internals could figure what causes this. This integral worked OK in V 14.0 but now in V 14.1 it gives <...
109 views

Simplifying an ODE in Bessel notation

I have the following Mathematica code: eq[r_] = 3 (1 + 2 a) g1 r y[r] - 2 (2 y'[r] + r y''[r]); DSolveValue[eq[r] == 0, y[r], r] This gives me the ...
93 views

Best way to implement the "plus-distribution" for very long expressions?

I'm at my wits end here. Is there an efficient way to implement the following distribution into MMA: $$\int_0^y dx \frac{f(x)-f(y)}{y-x}$$ where $f/1-x$ can be analytically integrated. The difficulty ...
187 views

How to fix this "wrong" analytical integral evaluation?

Integrate[(1/Sqrt[(x + 1)^2 + 1])*(1/Sqrt[1 + x^2]), {x, 0, 1}] yields ...
258 views

Closed form of an integral using Mathematica or otherwise

Define $$I=-\int_0^1\int_0^1 \frac{x^2(1-x)y^2(1-y)(2(1-xy)+(1+xy)\log(xy))^3}{(1-xy)^7}\ dxdy$$ Now using Wolfram Alpha $I\approx 0.00133186$. Using Mathematica or otherwise, I need to find a ...
1 vote
123 views

Integration of Gaussian functions takes ages

I am trying essentially to compute a fourier transform with Integrate. 1]Is integrate faster or slower than FourierTransform? 2]Does anyone know how to efficiently calculate these integrals? My code ...
84 views

How to use mathematica for differential geometry

I would like to learn how to efficiently use mathematica for differential geometry and tensor analysis. I googled it and mostly found some old references to packages. I wonder if there is a good ...
35 views

Integration or numerical integration over one variable out of many variables

I have a function defined as AFB = (6*I6parSMM)/(2*(3*I1cparSMM + 6*I1sparSMM - I2cparSMM - 2*I2sparSMM)); where the I'parSMM's are functions of other variables s, ...
1 vote
172 views

Can this previously solved three-dimensional constrained integration also be solved with certain added products in the integrand?

In Solved3DConstrainedIntegration the constrained three-dimensional (Hilbert-Schmidt-metric-based HSmetric) integration problem for the absolute separability probability of the two-qubit (quantum bit)...
1 vote
108 views

How to set integral starting from 0 in the symbolic solution to ODE

I have the following ODE Bfull'[t] == - (p0/( p0 + (1 - p0) E^Integrate[α[s], {s, 0, t}])) * α[ t] (S[t] - Bfull[t]) + α[t]*c + δ * Bfull[t] where α and S ...
64 views

Finding an increasing or decreasing function

I have a problem where I am given the derivative of a function, asked to graph it, then state where it is increasing or decreasing using Mathematica. f'(x)=(x^2-3^x)/2x 0<x<4 I've tried the line ...
45 views

How to calculate the average stream velocity from the segmentation of video frames?

I have a 10 second video of a river flowing. I want to calculate the velocity of the river flow using optical flow. In this operation, I used the ImageDisplacements ...
381 views

Wrong result for simple real-valued integral (spurious imaginary part)

Bug introduced in 13.3 or earlier and fixed in 14.1 There's a question on math SE (question 4879248) about this integral: ...
152 views

How can I find a condition for convergence of an integral? [closed]

Wolfram|Alpha says that $$\int_0^\infty \frac{x^n}{(x-1)(x-2)} dx=\pi (1-2^n)(\cot(\pi n)+i)$$ for $\text{Re}(n)>-1$. However, for $n=0$, it says the integral doesn't converge, even though it has ...