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)

1
vote
1answer
121 views

Function derivatives in arbitrary dimension

I have a higher dimensional function: $$f(x,t)=-\ln(t)-\ln(1-\left\|x\right\|^2-t^2)$$ where $x\in\mathbb{R}^n,~t\in\mathbb{R}$. I want to compute the derivatives with the commands ...
0
votes
1answer
153 views

Does Mathematica know if an integral is convergent or not?

Consider the following integrals that I asked Mathematica to do, ...
9
votes
3answers
556 views

Different results for integration using Mathematica and MATLAB

I have the following integration: $$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$ I get different ...
0
votes
1answer
93 views
8
votes
3answers
212 views

Pulling constants out of integrations [duplicate]

The following is the code and output of a Mathematica command How do I get Mathematica to remove $g(y)$ outside the integral?
6
votes
1answer
77 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 ...
4
votes
2answers
126 views

Integrating a BesselJ integrand to obtain the same result as Maple 16

I would like to check the following integration: Integrate[y*Integrate[1/x*BesselJ[1,x*Exp[I*π/4]]*BesselJ[1,x*Exp[-I*π/4]],{x,0,y}],{y,0,r}] Mathematica 9.0 is ...
4
votes
2answers
199 views

Can Mathematica (or its extensions) do integration following Risch algorithm?

I wonder whether there are option for indefinite integration in Mathematica that alow to choose the algorithm? Is there an option to use this algorithm in Mathematica?
4
votes
1answer
140 views

Volume within parameter space

Imagine a parameter space with variable 0<p<1, 0<e1<1/2 and 0<e2<1/2. ...
0
votes
1answer
109 views

Explicit, closed formula for recursive integral as a function of the recursive parameter

This is a follow-up of this question/answer. I'm working on a recursive integral more complicated than the one on the linked question, but this one can be used as an example. I would like to obtain ...
2
votes
1answer
88 views

Integrate and ConditionalExpression Output

I am integrating some difficult functions and using the conditional output to place bounds on parameters to ensure integrability, but it seems that not all of the conditions are being returned. The ...
0
votes
0answers
54 views

limit calculation step by step [duplicate]

I calculate such limit with Mathematica: ...
-1
votes
3answers
878 views

How do I determine the maximum value for a polynomial, given a range of x values?

I need to determine the maximum value for y = a x^2 + b x + c, where I know the coefficients and the upper and lower x values. ...
0
votes
1answer
92 views

How can I find the derivative of a combinatorial expression? [closed]

I want to differentiate the following equation: n = (nchoosek)*p*(1 - p)^(n - k) After differentiating my result is: ...
5
votes
0answers
167 views

Strange Integrate behavior (a bug!)

The following two calculations should give the same result. After all, integration is a linear operation. I have pasted the code below in case you want to play with it. ...
3
votes
2answers
327 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 ...
3
votes
1answer
329 views

Integral of Lorentzian yields different results depending on when parameter assigments are made

I'm evaluating the integral of a Lorentzian, which I know equals one. First I define the function and evaluate the integral in two slightly different ways. Surprisingly, I do not get the right answer ...
4
votes
2answers
702 views

Paths integrals in the complex plane

I can't find how to calculate path integrals of complex functions in the complex plane. For example: $$\oint_{\mid z \mid =2}\frac{1-e^z+z}{z^3 (z-1)^2}dz$$
12
votes
2answers
823 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 ...
2
votes
2answers
193 views

Calculate information entropy integral in infinite square well problem

In the context of information theory, entropy is a measure of uncertainty of a random variable. In quantum mechanics, the uncertainty principle states that $\Delta x\Delta k \ge 1/2$. The same can be ...
5
votes
3answers
202 views

Calculate integral for arbitrary parameter n in infinite square well problem

I'm continuing[1,2] the study of an infinite square well in the context of quantum mechanics. Ultimate goal is to calculate the product $\Delta x\Delta k$, for various eigenstates, that is for ...
0
votes
0answers
53 views

Reducing a long complex expression to a simplier one by using assumptions

so I have an ugly looking equation that I wish to solve under some specific circumstances. Using DSolve I write; ...
4
votes
1answer
177 views

How do I compute the entropy of the beta distribution?

I tried Expectation[-q*Log[q], q \[Distributed] BetaDistribution[a, b]] and got ...
1
vote
1answer
200 views

Gram Schmidt inner and outer products

I know the Gram-Schmidt orthogonalization generates an orthonormal basis from an arbitrary basis. I need help with: Write a program that inputs a list $\{b_1,\dotsc,b_n\}$ of linearly independent ...
0
votes
1answer
140 views

Plot[ D[Sin[x]] ] and Evaluate[] [duplicate]

Why does t = 2 Pi; Plot[D[Sin[x],x], {x,0,t}] (* Plotting the derivative of Sin[x] *) not work, but ...
17
votes
1answer
399 views

Incorrect result from Integrate

I attempted to calculate the following integral: ...
2
votes
2answers
126 views

Limit of integral gives incorrect output

I'm trying to evaluate $\lim_{e\to 0} \, \frac{i}{e}\int_{\pi }^0 \frac{1-\exp (i e \exp (i \theta ))}{\exp (i \theta )} \, d\theta$ with Mathematica 9.0.1.0 on OS X. However, I get "Undefined" for ...
11
votes
3answers
198 views

How to efficiently find moments of a multinormal distribution?

I have a multinormal distribution with covariance matrix $\sigma$ and zero mean. I want to find moment $$ E[x_1^{r_1}x_2^{r_2}\cdots x_n^{r_n}] =\,? $$ Of course, there is a build-in function ...
1
vote
3answers
181 views

plotting an Integration output

How to solve this integral by Mathematica even by numerical methods (plotting the solution) Integrate[(Cos[x] - a)/(1 + a^2 - 2*a*Cos[x])^1.5, {x, 0, 2*Pi}] It ...
6
votes
3answers
251 views

Where did I go wrong with my implementation of the trapezoidal rule?

One method for doing quadrature, called the trapezoidal rule, improves accuracy by connecting the points on the curve corresponding to the points of subdivision with line segments, forming trapezoidal ...
4
votes
2answers
234 views

How do I evaluate a symbolic integral involving Hermite polynomials?

I want to test a difficult integral : Integral on all reals of some complicated function involving the Hermitian polynomials, exponentials, squares, factorials, and being general considering any ...
0
votes
0answers
144 views
0
votes
0answers
135 views

Approximating a stochastic integral with a Wiener process

I would like some assistance to solve the following: $\sum\limits_{i=0}^{n-1} e^{-k(n\Delta t -i\Delta t)}\Delta z_i$ where $z$ is a Wiener process, $\Delta z_i = z((i+1)\Delta t)-z(i\Delta t)$. ...
3
votes
3answers
185 views

What is the formula for this numerical series?

I'm developing a questions game. My goal is that the score for each correct answer will increase as the user answers more questions. Initially there are 15 points for each correct answer. Every 4 ...
12
votes
2answers
3k 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?
9
votes
2answers
300 views

Recursive Integral for Volume of $n$-Ball

The volume of an $n$-ball (the $(n+1)$-dimensional analogue of a disk) of radius $r$ can be found by the following integral recurrence: $$V_0(r)=2r$$ ...
4
votes
3answers
202 views

Why does Integrate set the constant of integration to be one in this case?

Why does Integrate[(4 x)/(2 x + 1), x] give 1 + 2 x - Log[1 + 2 x] Notice the extra ...
13
votes
4answers
706 views

Mathematica gives wrong result while Wolfram|Alpha is correct

Why does Mathematica and Wolfram|Alpha give different results based upon the same code? I know Wolfram|Alpha's 7.85 is correct.
3
votes
1answer
105 views

Integration over a convex combination of a region: $\int_{\Omega} (w_1 z_1 + w_2 z_2)^{1-\sigma} d (z_1, z_2)$ where $\Omega = \{ z_1 + z_2 = 1\}$

Take $w,z\in R^{n}$. I am interested in integrating (as generically if possible) $$\int_{\Omega}(w \cdot z)^{1-\sigma} d z$$ Where the domain of $\Omega$ is $1$ dimension, and includes the convex ...
1
vote
3answers
424 views

How many iterations of Newton's method are needed to achieve a given precision?

Consider using Newton's method to solve the equation $arctan(x) = 0$. Using an initial guess of $x_0 = 1/2$ produces a sequence that converges rapidly. After $8$, iterations, $x_8$ is accurate to well ...
1
vote
0answers
95 views

Simple Jacobians, Gradients, etc. with arbitrary length vectors/matrices?

Is there any way (or a package built for it) can do simple operations with vectors and matricies of arbitrary size, but conforming extents? For the simplest example to test, given an arbitrary vector ...
14
votes
1answer
330 views

How to represent a continuous monotonic phase of Airy functions?

Note: In this question I am concerned only with real-valued variables and functions. DLMF, §9.8 Airy Functions, Modulus and Phase, formula $9.8.4$ defines the phase of Airy functions: ...
1
vote
0answers
78 views

Help with Integrals (and conditional expectations) of the Beta distribution: Integrate[e^(az) z^a (1-z)^b, {z, 0, 1}]

I have a Beta distribution, and am interested in calculating expectations and conditional expectations. The domain on the distribution is $z \in [0,1]$ Ignoring constants of proportionality, the ...
0
votes
1answer
131 views

Better way to evaluate integral containing Boolean function

I am trying to compute the integral ...
1
vote
1answer
54 views

Am I missing something in this integral?

I am trying to solve this simple integral: ...
9
votes
1answer
260 views

Mathematica: computing a difficult integral

I am trying to compute the following integral: Integrate[Exp[Sum[-((cw λ - b[i])^2/(2 σ^2)), {i, 1, n}]], {cw, 0, 1}] And currently Mathematica outputs ...
0
votes
1answer
483 views
0
votes
1answer
98 views

How do I generate arbitrarily many integration bounds? [duplicate]

I have a multiple integral of the following form: $$\int_{-\infty}^\infty \cdots \int_{-\infty}^\infty \exp(-\sum_{i,j=0}^n x_i A_{ij} x_j) dx_1 \cdots dx_n $$ Here, $A$ is a square matrix and $x_1 ...