New answers tagged

3 votes

How to remove error in NIntegrate

With using ?NumericQ we have ...
user avatar
  • 33.8k
0 votes

Avoid imaginary result FindRoot

It helps to mark out the singularities or eliminate them. We can get rid of one with a substitution z -> -u^2 + 9; another one appears only for certain values of ...
user avatar
  • 213k
0 votes

Solving elliptic integrals in Mathematica

The machinery I presented in this answer can be used to obtain a result in terms of the Carlson symmetric integrals. To wit, ...
user avatar
3 votes
Accepted

Integration over an implicit region

You want the region of integration to be defined by inequalities, rather than equalities. Your region can be described as follows: ...
user avatar
  • 58.4k
1 vote

Getting negative value instead of a positive value

Let us switch to rationals by ...
user avatar
  • 16.8k
2 votes
Accepted

Speeding up Boussinesq equations solving?

We use scaling as in our model on this page.See also Vahl Davis, G.de (1983) : Natural convection of air in a square cavity : A bench mark numerical solution. Int. J. Numer. Methods Fluids 3, 249-264. ...
user avatar
  • 33.8k
2 votes

Wrong sign with NIntegrate

Simplifying and rearranging the integrand, along with high precision, solves the problem in this case: ...
user avatar
5 votes
Accepted

Problem with NIntegrate a solution of NDSolve

You can't take derivative w.r.t. a number. You were passing t as number, then doing D[...,t] Try the following. It is also ...
user avatar
  • 108k
7 votes

Can Mathematica calculate this elliptic, triple integral?

If you regard symmetry of integrand (two times integral from 0<b<a) and rearange to do integration over c at last, you get the result in a non splitted integration in 10 seconds. Original ...
user avatar
  • 15.2k
10 votes

Can Mathematica calculate this elliptic, triple integral?

The unevaluated integral that Mathematica produced in the OP can be massaged a bit. First, note that due to symmetry, we can instead consider the integral ...
user avatar
23 votes
Accepted

Can Mathematica calculate this elliptic, triple integral?

Doing the Integrals separately for a, b and c gives the answer $\frac{128}{45 \pi}\sim 0.905415$, which agrees with the numerical estimate from NIntegrate: ...
user avatar
  • 974
3 votes

Numerical solution of an advance-delay ODE with multiple advances and delays

This problem can be solved by colocation method with using Euler wavelets. First, we map solution on unit interval $0\le x\le 1$. Then we define function f, first (f1) and second (f2) derivative as ...
user avatar
  • 33.8k
3 votes

NDSolve: there are more variables than equations, underdet

There are several typos in the code. First, initial data array probably should be in a form ...
user avatar
  • 33.8k
0 votes

How to make the NIntegate of two variables as efficient as possible

There are things in Mathematica worth trying, but I doubt it will result in massive speedup. First, as the integral is quickly decaying, setting the manual cutoff can result in increase of efficiency ...
user avatar
  • 74
1 vote

Multivariable NIntegrate gives different value if I integrate it separately

Indeed, in version 13 on Windows 10 y[x_?NumericQ] := NIntegrate[v^2 Exp[-x v^2], {v, 0, \[Infinity]}] NIntegrate[y[x], {x, 20, 1000000}] ...
user avatar
  • 16.8k
1 vote

Solution of NDSolve evaluates pointwise, but won't plot (possibly due to issue with FindRoot and replacement rules)

Just in case anyone runs into a similar issue, I figured out a fix! The issue was that NDSolve was setting n to a numeric value, and then trying to evaluate. So I used Block so that it would be ...
user avatar
4 votes
Accepted

Inconsistent results between NIntegrate and Integrate

If you look at the result of ...
user avatar
  • 16.8k
3 votes

Integration of accelerometer data to x-y-z position

You will know that the velocity is v= v0+ integrate(acceleration) and the path is x= x0+ integrate(velocity). For discrete data we can integrate using the function "Accumulate". BTW you ...
user avatar
  • 24.3k
1 vote
Accepted

Integration of accelerometer data to x-y-z position

First I add a time coordinate assuming that when you say frequency is 100 Hz you mean that the sample rate is 100 samples per second. ...
user avatar
  • 14.7k
2 votes

NIntegrate can't integrate function but work fine with the expression

You had this L = 10; psi0 := E^(-(x - 10)^2/10) NIntegrate[psi0[x], {x, 0, L}] You can't call psi0[x] when the function is ...
user avatar
  • 108k
3 votes
Accepted

Problem with NIntegrate and more general problems with NDSolve

FINAL ANSWER Here is the improved code. I have changed the method of NDSolveValue to ...
user avatar
  • 6,114
7 votes

Poincare section for a perturbed string

Small modification leads to appearance of random behaver and solves step size problem ...
user avatar
  • 33.8k

Top 50 recent answers are included