Questions tagged [numerics]

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

1,769 questions
Filter by
Sorted by
Tagged with
125 views

NDSolve problem with maxit, ndsz, and impsagpg

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: ...
260 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....
127 views
+100

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....
100 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: ...
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 ...
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$...
59 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 ...
79 views

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 ...
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 ...
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 ...
326 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 ...
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 ...
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 ...
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 ...
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. ...
130 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 ...
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 ...
350 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: ...
70 views

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 ...
75 views

...
517 views

Find zeros of a transcendental function

Mathematica 10 can not give me solution of this equation ...
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'. <...
65 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 ...
117 views

...
29 views

Using NSolve with an interporlated function

I have defined the interpolation function below ...
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: ...
988 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: ...
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[...
99 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 ...
2k views

244 views

How many equilibrium points exist?

Here comes the definition of a simple potential function ...