Share Your Experience: Take the 2024 Developer Survey

# Tag Info

Accepted

### Understanding leapfrog integration algorithm

In the second code the full time stepping is given by three lines in main() ...
• 465
Accepted

### What happens to the $O(\cdot)$ terms when we implement the Leapfrog Integration algorithm in a programming language?

It is not really wrong, but it is bad notation. It tries to combine the description of the numerical method, which is indeed implemented without the error terms, with the truncation error of the steps....
• 6,109

### Understanding leapfrog integration algorithm

The first code is wrong if you have multiple particles that interact. Due to the structure of the loop, the interaction forces with particles at the start of the list are computed with the updated ...
• 6,109

### What would be the right approach to numerically integrate in MATLAB an improper integral with Bessel function?

I solved this by observing the behaviour of the rapidly decreasing exponential function. It dropped to zero at about $\xi = 40$. So instead of integrating it from 0 to $\infty$, I integrate it from 0 ...
• 51
Accepted

### How to modify adaptive step size Runge-Kutta cash karp algorithm for higher accuracy?

At the state of the code in OPost, there is no hope to get any solution, as the passing of arguments in the ODE function derivs is interrupted by creating a local ...
• 6,109
Accepted

### How to numerically solve differential equations involving sines, cosines and inverses of the unknown function?

A common method is to spatially discretize your ODE/PDE, then use a Newton-Raphson method to solve the resulting non-linear system. For example, let's start by replacing the second derivative with a 3 ...
• 2,794
Accepted

### finding weak form of nonlinear differential equation for FEM simulation

First notice that $$(k_3 - k_1)\sin(u)\cos(u)(u')^2 + (k_1\cos^2(u) + k_3\sin^2(u))u'' = ((k_1\cos^2(u) + k_3\sin^2(u))u')' + (k_1 - k_3)\sin(u)\cos(u)(u')^2.$$ I choose to rearrange our equation so ...
• 2,546
1 vote

### 'Integral2' error in MATLAB for invalid integrand

If you wish to evaluate this numerically there is no need to involve symbolic math, and we can just write functions; ...
• 1,008

Only top scored, non community-wiki answers of a minimum length are eligible