Tag Info

Why does Replace function not work the first time I try it?

The problem is that the expression doesn't have g[x]/x just isolated from Cos[x]: ...
• 24k

Why does Replace function not work the first time I try it?

Three errors: Execute cells separately if you refer its result. Use :> instead of -> to avoid evaluation of rules already at input time. Don't use %, it was created for the math.exe text input. ...
• 3,965
Accepted

How to handle undefined Integral results for excluded conditions in Mathematica

To get rid of condition like If I use a trick: ...
• 14.7k
Accepted

I'll redo the math from this solution for the more general case of $$\int_{\text{ball}(R_1)}d^3\vec{r}_1 \int_{\text{ball}(R_2)}d^3\vec{r}_2 \|\vec{r}_1-\vec{r}_2\|^{2n}$$ of which you'll use $R_1=... • 48.8k 1 vote LineIntegrate seemingly does not work Try LineIntegrate[1/(x + I y), {x, y} \[Element] Circle[]] LineIntegrate[1/Abs[x + I y], {x, y} \[Element] Circle[]] • 811 3 votes Mathematica integral wrong The result is totally wrong. This integral isn't too hard to do in spherical coordinates. Start with the interaction between two spherical shells of radii$r$and$r_1$. Let$\{x,y,z\}=\{0,0,r\}$(we ... • 48.8k -2 votes Mathematica integral wrong The result is mathematically correct, therefore there is no bug in Mathematica. What you are trying to compute is this integral$$\mathcal{I}=\int_{B_R^3}\int_{B_{R_1}^3}\frac{1}{|\mathbf{x}-\mathbf{... • 2,194 0 votes How to find the local maximum and minimum of a function Example for domain$(0,2\pi)$coloring maximum green and minimum red: ... • 62.8k 3 votes Accepted Problem computing a limit Sum[] is difficult to handle in general, and it seems to be why Limit[] is so slow. In this case, it's a polynomial and its ... • 239k 1 vote Allan Variance integral for a first order Markov process You can add Assumptions to Integrate: ... • 2,180 4 votes Convergence of$\left\{n!\sum_{k=1}^{n!}\frac{1}{k^{\frac{3}{2}}}\right\}$as$n\to \infty$using Mathematica or otherwise Let's change n! to nfact. ... • 59.6k 3 votes Problem computing a limit The problems seems that for different$j$you can get 1/0 division depending on what$x$value is. So without having specific value of$j$might not be possible. ... • 147k 1 vote Convergence of$\left\{n!\sum_{k=1}^{n!}\frac{1}{k^{\frac{3}{2}}}\right\}$as$n\to \infty$using Mathematica or otherwise Let's define some functions to evaluate these numbers at high accuracy: ... • 48.8k 3 votes NDsolve does not solve equation Here is an example that actually runs without messages, fixing a number of errors in @zeraoulia rafik's code and adjusting parameter values to make a nice plot: ... • 239k -1 votes NDsolve does not solve equation According to the recommendations given by @Nasser in the comment above, I have tried to show your solutions by adding the missing numerical values for your parameters and initial condition values. I ... • 1,049 0 votes Integration of Gaussian functions takes ages You ran into the mess that Mathematica has with its definite integral input check. They try a list of known algorithms, primarily in the real line residues., The alternative of doing the indefinite ... • 3,965 5 votes What methods can quickly determine the coefficient of determination of the data? If you want to be "old school" (using linear algebra): ... • 62.8k 4 votes Mathematica integral wrong Not an answer, but this won't fit in comment: ... • 4,625 6 votes Accepted How is the result of this integral obtained by the function Integrate? I'm not sure if this is an intended behavior or a bug in Mathematica's end, but it does make sense to get different results. Below, I show how to get both results as desired. EDIT: Some people ... • 2,194 1 vote Numerical approximation of the integral by using data ... • 81.8k 0 votes Finding an increasing or decreasing function Reduce[(x^2 - 3^x)/x > 0]$-\frac{2 W\left(\frac{\log (3)}{2}\right)}{\log (3)}<x<0$• 41.8k 2 votes Confused about the output of CosIntegral CosIntegral[z] is equivalent to the (complex!) integral ... • 239k 2 votes Confused about the output of CosIntegral Two things:$\cos (\pi x)/x$is an odd function, not even! Other than that you are (I think) confusing two functions, let's just assume real$xthe CosIntegral[x] ... • 790 1 vote Checking the sign value of the derivatives of a complicated function Function e[w]only depends on two parameters a i W and i+lambda ... 3 votes Integration with respect to functions The Mathematica result seems to be correct if we assume Integrate[x, f[x]]==Integrate[x f'[x]],x] Integration by parts ... 4 votes Integration with respect to functions You can write is as \begin{align*} \int xd\left( f\left( x\right) \right) & =\int x\frac{df}{dx}dx\\ & =\int xf^{\prime}dx \end{align*} And Mathematica gives now ... • 147k 1 vote Partial Derivative after Numerical Integration of a Complicated Expression with Singularity at Zero Maybe this can get you going, not sure it is all correct, the graph looks a bit different, but maybe with more points and fixing ColorFunction and ... • 17.2k 1 vote Partial Derivative after Numerical Integration of a Complicated Expression with Singularity at Zero Do you realize that you have about 1.97506*10^10 oscillations per unit change in k for smallish ... • 239k 1 vote How is the result of this integral obtained by the function Integrate? Workaround: ... • 14.7k 2 votes How is the result of this integral obtained by the function Integrate? It is a bug in Integrate. The numerical result seems to be the correct one. You can use Rubi integrator for workaround meanwhile. ... • 147k 1 vote Plotting a parametric function on xy, xz, and yz planes Using ProjectGraphics3D by Wolfram Staff ... • 81.8k 0 votes How to get multiplication of the elements of a specific list/matrix list = {a, b, c, d}; Using AccumulateApply by Ian Ford and Jon McLoone ... • 81.8k 2 votes Accepted StreamPlot3d for the magnetic field of a loop If you prevent the definition of Bx, By, Bz to be evaluated for symbolic argument and and introduce "Thread" in their definition you can get a reasonable time for evaluation. Further note, ... • 53.7k 8 votes Integration of the product of two exponential functions General formula exist. Can be expressed by FoxH function: ... • 14.7k 4 votes Integration of the product of two exponential functions This also shows that for different values ofa$, solutions can be very different. So general formula is most likely do not exist. Mathematica also hangs on some specific values of$a$. So I put time ... • 147k 4 votes Integration of the product of two exponential functions Probably no closed formula for this integral is known for general value of a. As commented by @mikado, you can get a (complicated) formula if a is a rational number. For example, ... • 1,550 1 vote Integration involving Piecewise function and DiracDelta function to long for a comment: Analytical solution approach My numerical answer Numerical solution using Convolution property gives the reduced integration range ... 2 votes Accepted Integrate diverges for convergent integral, and returns unnecessary condition Why did the original integral failed if the finite integral converges at the limit? Try ... • 147k 2 votes Integration involving Piecewise function and DiracDelta function Numerical solution using Convolution property (german: "Ausblendeigenschaft") of DiracDelta[] (only case x=3/2) ... 3 votes Integration involving Piecewise function and DiracDelta function Here is a mixed algebraic/numerical solution. EDIT: I have now improved this to a fully algebraic solution. For "version control" I have appended the update to the end of my original ... • 5,084 3 votes Possible bug in partial derivative The case for$x=y$should be undefined as is evident from: Plot3D[Min[x, y], {x, -1, 1}, {y, -1, 1}, Mesh -> None] You can "work around" using ... • 62.8k 3 votes Possible bug in partial derivative A problem here is that we cannot know the a priori relationship between x and y, which means D[Min[x, x], x] should return 1 ... • 811 9 votes Possible bug in partial derivative From the documentation for Piecewise, "Possible Issues": Derivatives are computed piece-by-piece, unless the function is univariate in a real variable... ... • 3,569 2 votes Numerical approximation of the integral by using data ... • 81.8k 1 vote Slope of a line data = {{x1, y1}, {x2, y2}}; A variant of Bob Hanlon's slope3 using ReverseApplied (new in ... • 81.8k 5 votes Accepted Possible bug in partial derivative It is not clear why sometimes you take a limit and sometimes you just substitute the value. Consider ... • 19.2k 2 votes Accepted Describing the region of integration$\mathbb{R}_+^n$for arbitrary$n\$

Instead of using "list" variables, like x = {x1, x2, ...}, use "indexed" variables, x[1], x[2], ..., which ...
• 27.9k

...
• 27.9k

Numerical approximation of the integral by using data

I think @Roman's modification of @JocelynMinini's use of Interpolation + Integrate is easy to code, easy to understand, and ...
• 239k

Possible bug in partial derivative

...
• 160k

Top 50 recent answers are included