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
0
votes
1
answer
75
views
How to enforce $\alpha < 0$ and $k \neq 1$ when solving a system of linear equations?
I want to solve a system of linear equations $$\begin{cases}
\alpha C + \beta &=0 , \\ ( e^{\sqrt{-\alpha}} - k ) A + ( k - e^{-\sqrt{-\alpha}} ) B &=0, \\ ( e^{\sqrt{-\alpha}} - 1 ) A + ( 1 - ...
0
votes
1
answer
12
views
Plot with solutions of NDSolve
I am trying to substitute the values of phi[z] and phi'[z] back into my equation for Hubb[z] to then plot and compare. The issue I am having is that when I am substituting back into the Hubb[z] ...
1
vote
1
answer
64
views
Issue with variable within Sum[] bounds
I have the following sum that starts from a variable lower bound index $n$:
$$\sum _{y=n}^x \frac{n^2! \left(n^2\right)^{-x} \mathcal{S}_x^{(y)}}{\left(n^2-y\right)!}$$
I tried to compute a closed ...
3
votes
2
answers
156
views
Sum[] function not computing the sum
I have the following sum:
$$\sum _{y=0}^x \left(1-n^2! \left(n^2\right)^{-y} \mathcal{S}_y^{\left(n^2\right)}\right)$$
Which, in Wolfram language can be written as:
...
0
votes
1
answer
136
views
Integration Technique
I have 6 huge expressions I want to integrate. Is there any way to break them piecewise and then send them for integration?
Two sample expression are:
Expression 1:
...
1
vote
0
answers
52
views
Problem with Plot3D in Mathematica for plotting functions involving parabolic cylinder, exp, and error functions
I have the following problem to make plots of two functions:
Eq.1
$$
\begin{align*}
A_1(a, \Delta, \omega_0)
&= 1 - \frac{2\Delta^2}{\omega_0} + \frac{a^2}{\omega_0^2}
- \left[1 + \frac{...
7
votes
2
answers
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 ...
2
votes
1
answer
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
2
answers
187
views
Can't integrate a highly oscillatory integrand
I have a long formula
...
1
vote
1
answer
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:
<...
10
votes
2
answers
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
3
answers
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?
...
-2
votes
0
answers
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?
12
votes
1
answer
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 ...
0
votes
2
answers
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:
<...
2
votes
1
answer
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
1
answer
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
0
answers
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:
...
0
votes
1
answer
28
views
How to put prime before value during a substitution?
Here is a sample Mathematica code:
...
3
votes
2
answers
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 ...
5
votes
2
answers
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 ...
3
votes
1
answer
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 ...
2
votes
2
answers
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 ...
3
votes
0
answers
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 ...
2
votes
1
answer
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 ...
-2
votes
1
answer
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 ...
3
votes
0
answers
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:
...
0
votes
1
answer
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, ...
0
votes
1
answer
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
1
answer
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:
\begin{equation}
\Sigma(p)=\frac{\lambda^2\...
2
votes
1
answer
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$.
...
-3
votes
1
answer
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!!
...
0
votes
0
answers
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
\begin{equation}
-\frac{\partial^2\phi(z)}{\...
1
vote
2
answers
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
2
answers
364
views
Incorrect results of DSolve
Finding a fundamental solution of a certain
linear partial differential operator, I try
...
1
vote
2
answers
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 ...
5
votes
1
answer
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
<...
0
votes
1
answer
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 ...
4
votes
1
answer
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 ...
2
votes
3
answers
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
...
5
votes
1
answer
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
1
answer
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 ...
0
votes
0
answers
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 ...
0
votes
0
answers
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
1
answer
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
3
answers
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 ...
0
votes
1
answer
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 ...
0
votes
0
answers
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 ...
7
votes
2
answers
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:
...
2
votes
1
answer
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 ...