# Questions tagged [numerics]

Questions on the numerical functions of Mathematica, implementing numerical methods and numerical computing with Mathematica.

1,772 questions
Filter by
Sorted by
Tagged with
0answers
45 views

### NDSolve throws LinearSolve::mcovl for the uncompressible N-S equation of the flow around a cylinder

I am trying to solve the uncompressible N-S equation to simulate the flow around a cylinder, following the vorticity-streamfunction approach. (All code supplied both as a picture and a copiable code ...
1answer
91 views

### _?NumericQ inside NDSolve to speed up code

I've seen some people using _?NumericQ to prevent symbolic calculation and speed up NDSolve. Why in this simple code is not ...
1answer
26 views

### Numerical derivative (ND) not working for orthonormalized eigenvectors of a matrix

I have problem making ND work. Define relevant needs and vectors ...
1answer
129 views

### NDSolve problem with maxit, ndsz, and impsagpg [closed]

I'm trying to solve a system of 24 non-linear differential equations using Implicit RK method. My code works perfectly for simple case, i.e., BB=0, but for non-zero BB, Mathematica gives errors: ...
1answer
262 views

### Improvement of code precision using NDSolve for Differential-Algebraic equation

I'm trying to solve a system of 24 non-linear Differential-Algebraic equations (DAE). I'm using the command NDSolve in Mathematica to solve this system, using this command, the error is too much large....
0answers
151 views

### Numerical backward induction — Solving sequential Cournot

I'd like to numerically solve a sequential Cournot competition in which supplier 1 moves before supplier 2, then the manufacturer sources from them, and finally sells the item at market clearing price....
1answer
102 views

### WhenEvent how to handle events at the same time and detection order

I need to use WhenEvent inside NDSolve in which events happen simultaneously. I show simple code to better explain my question: ...
0answers
37 views

### Free boundary condition for American Option using Mathematica NDSolveValue

Was wondering if there is a Mathematica example solving the free boundary condition for American Option using NDSolveValue (free boundary condition is continue to hold v.s. early exercise of the ...
0answers
32 views

### Solving for a few roots in the neighborhood of an initial point for an eigen-equation with many roots

I have a system that is described by a complex matrix, $U$, which is a function of two parameters $f, \beta$ (a dispersion eigen-relation in wave physics). We are interested in the solutions ($f,\beta$...
3answers
62 views

### How to ask Mathematica to do the given operation for a set of parameters?

I have a set of numbers like this s = {a, b, c, d, e, f, ..., g, h} and I would like to ask Mathematica to do the following operation (to sum the subtractions of ...
3answers
79 views

2answers
44 views

### Subscript to replaced parameters

I'm trying to manipulate numerical scheme's indexes: $$T=D-N \\ \frac{T_i^{n+1}-T_i^n}{\Delta t}=\frac{D_i^{n+1}-D_i^n-(N_i^{n+1}-N_i^n)}{\Delta t}$$ But I don't know how to do the transition on the ...
1answer
55 views

### Is it possible to ask Mathematica to give all the roots of the given function?

I have this equation $$36 \cos \frac{3 x}{4} \cos \frac{27 x}{20} \left(\cos \frac{3 x}{5} +2 \cos \frac{21 x}{10} \right)=0$$ Is it possible to ask Mathematica to give all the roots of the ...
2answers
102 views

### NIntegrate results different when using 0 or 0.0

i was trying to compute a convolution numerically, but got unexpected results. In the end i was able to reduce it to the code below. As you can see, the results are different, depending on whether i ...
2answers
327 views

### Suggest an irrational number from decimal one

I want to know is there any function in Mathematica that suggests a simple irrational number combination for decimal one? For example, if I give 0.804738 then I get ...
1answer
53 views

### Numeric solution of ODEs oscillates strongly and stops halfway？

I tried to reproduce the results of a paper. The differential equations are given by ...
3answers
4k views

### Is manual adjustment of AccuracyGoal and PrecisionGoal useless?

This is a problem confusing me for years. AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to ...
1answer
47 views

### NSolve missing solutions

I'm having trouble solving the transcendental equation. For some values ​​of bi, NSolve obtains 6 roots, however when changing the value, it obtains 5. Graphing the function clearly shows that the ...
1answer
60 views

### How to use parallel computation in mathematica for numerical Integration

I have a multi dimensional integral and I need to integrate it numerically and than plot it over an extra variable for zeta = 0.5. ...
3answers
133 views

### How to approximate the harmonic sum $\sum_{n=1}^\infty\frac{{4n\choose 2n}\overline{H}_{2n}}{n 2^{4n}} ?$

How to approximate $$\sum_{n=1}^\infty\frac{{4n\choose 2n}\overline{H}_{2n}}{n 2^{4n}} ?$$ Where $\overline{H}_n=\sum_{k=1}^n \frac{(-1)^{k-1}}{k}$ is the skew harmonic number. The mathematica ...
0answers
53 views

### Solving these set of equations with complex parameters

For $\{a,b,c\}\in \mathbb{C}$ and $\{\gamma,N\}\in \mathbb{Z}^+$, I have an equation ...
3answers
352 views

### My evaluation is taking a lot of time

I was evaluating the roots of a transcendental equation, when I noticed that Mathematica never finishes but stays in the running state. The following is the code that I was using: ...
0answers
70 views

0answers
56 views

### Assumptions for special functions - dirac delta confusion

I wasn't able to express dirac delta function for the below advection-diffusion-reaction function. (Dirac delta term is useless, either a3 = 0.9; or ...
2answers
75 views

...
4answers
518 views

### Find zeros of a transcendental function

Mathematica 10 can not give me solution of this equation ...
0answers
25 views

### Error using ParallelMap to evaluate NIntegrate of numerical derivative ND

I want to evaluate a numerical integration in which the integrand is constructed out of a function f and its derivative f'. <...
1answer
66 views

### Diffusion equation with non uniform diffusion constant

I am trying to numerically solve a 3D diffusion type equation with a spatially varying diffusion $\nabla\cdot(K \nabla T)=\partial T/\partial t$ with K a given function of space with different ...
0answers
117 views

...
1answer
29 views

### Using NSolve with an interporlated function

I have defined the interpolation function below ...
2answers
90 views

### How do you overcome recursion limits when using DSolve?

I have the following program to solve for the neutron to baryon ratio during BBN. I've replaced many of the derived values with constants in order to focus on the problem: ...
5answers
989 views

### NDSolve DAE with Constraints

I'm trying to make some numerical simulation with NDSolve. I have encountered a few problems. Here is a simplified version of the equations: ...
2answers
37 views

### Warning when confluent hypergeometric function HypergeometricU is wrong?

From the definition as an integral (HypergeometricU/details), this function must be positive. However, it gives negative numbers in some cases with no warning of a potential error. For example, In[...
0answers
100 views

### NDSolve big system non linear coupled ODE's Method Residual Stiff System

I'm trying to develop a continuous time unscented Kalman filter for a dynamic system inspired to this article: "On Unscented Kalman Filtering for State Estimation of Continuous-Time Nonlinear ...
2answers
2k views