Skip to main content

All Questions

Filter by
Sorted by
Tagged with
7 votes
2 answers
179 views

Can Mathematica differentiate summation notation with respect to an indexed variable?

My question is whether Mathematica can represent an expression such as: $$y_i = \sum_{j=1}^N a_{ij} x_j$$ symbolically as a sum over indefinite bounds (unknown $N$), and differentiate it with respect ...
5 votes
1 answer
444 views

Symbolic second order derivative of real antisymmetric matrix in Mathematica

I would like to calculate the second order derivative of a function with respect to a matrix coefficient symbolically. Below is the first order derivative of S with respect to the coefficient of x. ...
2 votes
3 answers
236 views

Trouble with branch cuts plotting a real function

When I plot the following function ...
0 votes
1 answer
225 views

Symbolic partial differentiation of a Lagrangian function including a summation

I'm using Mathematica to double-check that I correctly derived first order conditions for the models I'm researching. Before I get started, I wanted to actually teach myself how to use Mathematica, ...
1 vote
2 answers
97 views

Parabolas to the right or to the left

I would like some help to make the opening (concavity) of the parabolas go to the right or left, and not up or down. ...
0 votes
0 answers
80 views

Why does such a simple integral crash my kernel?

...
0 votes
1 answer
61 views

Computing an exact range with FunctionRange

When using FunctionRange to compute the range of the two-argument ArcTan function, Mathematica fails to return an exact answer. ...
1 vote
2 answers
136 views

Solving differential equation through function [duplicate]

Folks! I am trying to obtain the plot the phase portrait of the following differential equation in Mathematica. My task is to do the work through function by numerical solution. The equation is: $$\...
0 votes
0 answers
38 views

Advice on how to get an approximate symbolic expression for nasty limit-integral

I have a fairly nasty integral-limit expression that I need to resolve and was hoping for some advice on the best practice to getting a solution. I have the following functions \begin{gather*} w(\beta,...
5 votes
4 answers
552 views

Plot an infinite but convergent series

I would like to plot the following function $$ f(m)=-2 \sum_{k=0}^{\infty}\binom{1/2}{k} \left(2^{2(k-1)}-1\right)\zeta(2 (k-1))\left(m^2-\frac{1}{4}\right)^k $$ I am only interested in $m$ between 0 ...
1 vote
1 answer
69 views

Parallel loop wrecks integration

I am doing a quadruple nested integral and noticed that it produces inconsistent results when in a parallel computing environment. ...
2 votes
3 answers
83 views

Strange behavior when integrating vector valued piecewise function

The following straightforward integral should clearly equal $\{0,0\}$ for any $R\in\mathbb R$: ...
0 votes
2 answers
86 views

Error on the square of sum of binary elements for symbolic upper limit

I'm seeing the following error: as a part of some equations, I have $E[(\sum_{i=1}^n X_i)^2]$, with $X_i\sim Ber(p)$. Using independence between $X_i$ and $X_j$ for $i\ne j$ and that $X_i^2=X_i$, $E[(\...
2 votes
1 answer
186 views

How to separate parameters from a list based on certain conditions?

The following codes create a table of parameters Br and Dr based on corresponding parameters b and c. How to separate/divide the list/table of Br and Dr for which corresponding b or c are negative ...
1 vote
0 answers
47 views

Seeking Upper Bound on the Number of Extrema for Large Function

I'm working on finding an upper bound on the number of extrema for the function f[h,l,d,x,y] concerning the variable h. The ...
0 votes
0 answers
64 views

How to Replace the expression with unknown parameters?

I do not want to do Derivative, because it will be very slow after million times. My expression is just the Exponential as following, ...
0 votes
0 answers
75 views

Weird indefinite integration in Mathematica explicitly introduces a pole that does not exist

Consider the following code: ...
3 votes
2 answers
585 views

Is it possible to get analytic solution of this integral?

I am trying to evaluate the following integral, but Integrate just returns the input: ...
0 votes
0 answers
79 views

Reflected Wave and Power Spectrum for a Toda Oscillator

I'm trying to analyze the power spectrum of the reflected wave. Specifically, I want to compute the time series, take the Fourier transform, and average the absolute values to obtain the spectrum. The ...
3 votes
3 answers
226 views

Reconstruct points on a sphere from matrix of dot-products

Suppose I have a matrix of pairwise dot products corresponding to vectors on a sphere. How do I reconstruct these vectors (up to a rotation?). Below is a solution that reconstructs a set of vectors ...
4 votes
1 answer
146 views

Why equal series written in a little bit different way both diverges and converges?

I am very new to Mathematica, so I am sorry if the answer is obvious. I wanted to calculate the sum of the following series: ...
5 votes
1 answer
226 views

Series Converges or Diverges?

I am running MMA 13.1.0.0 on Windows 10 - x86. Is there any way to get Mathematica to conclude that this sum converges (maybe it needs some additional input)? ...
0 votes
1 answer
176 views

Concept of tangent and residual in AceFem and automation

here trying to solve the pde: ut + ux = 0 in acefem. I have two questions regarding tangent and residual. Tangent shows the s$$ and residual shows ...
2 votes
3 answers
287 views

Help with derivative command [duplicate]

I am trying to find the Mathematica command for $$f(k,a,b)=\frac{\partial^k}{\partial {a}^k }\csc\left(ab\pi\right)$$ and here is what typed for the command ...
2 votes
1 answer
138 views

How to find this four-dimensional integral as an iterated integral with Mathematica?

I mean the following integral $$\int\limits _{[0,1]^4}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\,dx_1dx_2dy_1dy_2 .$$ Its value is the average length of a random interval in the unit square (see, for example, ...
1 vote
2 answers
80 views

How to extract coefficients from a rational expression [closed]

I try to extract the following coefficients from a rational expression, but something that seems so simple mathematica cannot do it $$\frac{3 \left(9 \sqrt{39}-13 i\right)}{26 \left(4 i k+3 i+\sqrt{39}...
4 votes
1 answer
177 views

Robust Computation of Inverse Stieltjes Transform

I'm interested in finding a small set of procedures which I can use to compute inverse Stieltjes Transform for a random variable. I'm interested in Stieltjes transform solved: ...
0 votes
2 answers
108 views

Finding the best initial condition of NDSolve for different boundary condition

I have the following Mathematica code, which solves the second-order differential equation: ...
5 votes
2 answers
295 views

Visualizing density given by its Stieltjes transformation?

How can I use Mathematica to get $f(y)$, the PDF of a random variable given its Stieltjes transform $g(s)$? $$g(s)=E\left[1/(s-X)\right]$$ I need to visualize probability density of a random variable ...
3 votes
1 answer
191 views

Inverse Stieltjes Transform Implementation?

Are there any implementations of Inverse Stieltjes Transform in Mathematica? For instance, in the example below, I'm hoping to recover Beta(1/2,1) density $\frac{1}{2 \sqrt{x}}$ from its Stieltjes ...
0 votes
1 answer
95 views

Unable to solve an analytic integration

I have been trying to do an analytical integration of the following function with respect to s: ...
1 vote
0 answers
116 views

Integrate numerically over implicit complex contour

I'm trying to numerically evaluate the following integral: $$ \int_0^\infty dt\ e^{-(a+i\alpha) t}(1+e^{-t})^{-(b+i\beta)}, $$ where $a,b$ are some rational numbers and $\alpha,\beta$ are relatively ...
0 votes
2 answers
71 views

How to speed up the n-th Laplacian or derivative of function?

We wish to solve for the multiple Laplacian of a function, and here we use sum of E-exponential functions as an example: ...
0 votes
5 answers
285 views

What's the correct answer for $ \oint_{C} \frac{e^{1/z}}{z^{2} - 1} \, dz$?

$$ \oint_{C} \frac{e^{1/z}}{z^{2} - 1} \, dz, $$ where $ C $ is the unit circle defined by $ |z| = 1 $. The original question can be found under the answer from Ron Gordon's answer to "contour ...
1 vote
1 answer
262 views

How to obtain the n-th derivative of $1/(-x+xe^{(i \pi x)})$? [closed]

Wolfram Alpha symbolic integer derivative to this question is wrong. How can i obtain it by Mathematica? Thanks D[1/(-x + x*Exp[I*Pi*x]), {x, n}]
0 votes
2 answers
66 views

How do I solve for a variable for a derivative equation?

So I'm entering this as input: f[p_] := Subscript[l, i] Log[ p] + (N - Subscript[l, i]) Log[1 - p] f'[p] ...
0 votes
1 answer
145 views

Help in solving the following bvp

...
4 votes
3 answers
212 views

Solving integral equation numerically

I tried to solve a integral equation numerically, but I failed. The equation is:$\epsilon(\beta)=r\cosh{\beta}+\int^{\infty}_{-\infty}\varphi(\beta-\beta')\ln(1+e^{-\epsilon(\beta')})d\beta'$ were $\...
2 votes
1 answer
252 views

Why "Integrate[Abs[x1 - x2], {x1, 0, t}, {x2, 0, t}]" get wrong output?

Bug introduced in 12.0 or earlier and fixed in 14.0. To verify the following double integral $$ \int_0^t{\int_0^t{\left| x_1-x_2 \right|\mathrm{d}x_1\mathrm{d}x_2}}=\frac{t^3}{3} $$ The MATHEMATICA (...
3 votes
1 answer
119 views

Why is Mathematica using Re'[..] in calculation? [duplicate]

Suppose I have the following Mathematica code: a[x_] := 1/Abs[E^Sqrt[f[x]]] g[x_] = D[a[x], x] The output of g[x] is $-\frac{e^...
6 votes
4 answers
510 views

Approximation of the Fabius function with a quotient of exponentials

Approximation of the Fabius function $f(x) = \text{FabiusF}[x+1]\cdot \text{HeavisideTheta}[1-x^2]$ - FabiusF[x] doesn't work in Wolfram-Alpha I am looking to figure out how well the displaced version ...
12 votes
3 answers
254 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, ...
0 votes
1 answer
92 views

A hypergeometric series function

Maple and Mathematica are very efficient to find closed form of a hypergeometric function as for example: $$\sum _{k=0}^{\infty } \frac{(-4)^k z^k \Gamma \left(1 k+\frac{1}{6}\right) \Gamma \left(\...
6 votes
1 answer
238 views

How to force Mathematica to evaulate LerchPhi[1,0,1] to -1/2

Mathematica fails to evaluate LerchPhi[1,0,1] (it gives ComplexInfinity). Based on the relation LerchPhi[1,q,1]=Zeta[q], we ...
0 votes
1 answer
125 views

Adding Assumptions in double integral written in "math input" mode

I've the following double integral and I'd like to write Assumptions->Re[c]>0, but if I try to do it, I get a syntax error. How can I add the above condition but without changing the ...
5 votes
0 answers
171 views

Hypergeometric Function Integration Using Mellin-Barnes Representation

I have the following integral: $$ I=\int_0^1 d \alpha d \beta d \gamma r(\gamma) s(\alpha, \beta) T(\alpha, \beta, \gamma) $$ where I define $$r(\gamma)=(\gamma(1-\gamma))^{ -1 / 2+\epsilon / 2}$$ and,...
1 vote
1 answer
96 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 ...
0 votes
1 answer
150 views

How to expand the existing basis set so that it becomes more complete?

I have a set of anisotropic gaussian basis set which describes the ground state of the system with great accuracy. The Hamiltonian of the system has the following form: $$H=-\frac{1}{2}\Delta-\frac{1}{...
0 votes
0 answers
104 views

Speed up the integration of HeavisideTheta over the range from zero to infinity

The problem is described in the following figure. Mathematica version 14.0, OS windows 10 LTSC. The integration interval is [0,infinity), and the value of HeavisideTheta in the point 0 is 0. we can ...
2 votes
0 answers
100 views

Why does HeavisideTheta give different value at the point 0 and 0.?

As the following figure described, why does HeavisideTheta give different value at the point 0 and 0.? Especially at the coordinate origin, one gives the value 1 and another 0 when HeavisideTheta[0]=0....