# Questions tagged [numerics]

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

1,369 questions
Filter by
Sorted by
Tagged with
3answers
156 views

...
2answers
124 views

### Getting additional control over MaxRecursion/PlotPoints

I'm occasionally in a position where I need to compute a RegionPlot with some small area of the plot being computationally much more expensive then the rest of the ...
0answers
37 views

### Weird fluctuations in DensityPlot

I have a really long multi parameter Lorentzian function: ...
1answer
63 views

I want to find solutions to the system: \begin{align*} -2b'(s)\sin(b(s)) &= \sin(b(s))(a'(s)b''(s) - a''(s)b'(s)) - (a'(s))^3 \sin^2(b(s))\cos(b(s)) \\ &(a'(s))^2\sin^2(b(s))+(b'(s))^2 = 1\... 1answer 100 views ### How to represent in a 3D graph the set of solutions to this system of inequalities? I am studying this piecewise function: ... 0answers 58 views ### Details of NDSolve calling LSODA Inspired by my question regarding the computation time of NDSolve using the LSODA backend I was wondering how NDSolve is actually calling LSODA (what arguments are sent to LSODA), i.e. what are the ... 1answer 59 views ### Numerical Approximation of erfc I have a crazy output. I already tried the N[] function. All it does is condense the inputs. Any idea of how to have a numerical output from the code? 2answers 65 views ### NDSolve producing message Power::infy I am trying to solve geodesic equations in some 3D black hole spacetime. It is a coupled ODE system with boundary conditions. Due to the symmetry of the spacetime, I expect the solutions to be even ... 0answers 134 views ### Derivative of an interpolation function is noisy I have a set of numerical data of 1501 points, in the form of \{x_i,a_i\} which I uploaded to here and here. I need to compute the numerical derivative of this data. In particular, I need the ... 1answer 231 views ### Newton's Method Problem statement: I'm currently new to Mathematica and have been trying to solve this problem. I was digging around and found this code: ... 0answers 47 views ### Problem with significant digits [duplicate] I wrote this short code ... 1answer 85 views ### How to get solutions for this system of inequalities? I am new to Mathematica and I am struggling finding the solution for the following problem. I am studying this piecewise function: ... 0answers 33 views ### Inverse of Normal Distribution CDF incorrect for large value? I have a function F which is the CDF of the standard normal distribution. The inverse of F should be infinity at 1. However, I ... 0answers 168 views ### On Ж, and the fine-structure constant I'm trying to reproduce the results from a certain infamous paper that has been moving around the web for the last few days. The details are irrelevant. This paper claims to have a closed-form ... 1answer 108 views ### Computing numerically infinite sum of some double series Let's consider the series: F(t) = \sum\limits_{n=0}^{\infty}\sum\limits_{k=0}^{\infty} \frac{(-b)^k(-a)^n\binom{n+k}{k} t^{2n+k(2-\alpha)}}{\Gamma(2n+k(2-\alpha)+2)} $$where a,b are ... 0answers 82 views ### Is it possible to solve following question about integer programming using mathematica? Consider a 5-uple (r,a,b,c,s) with a,b,c\in\mathbb{Z},s\in\mathbb{Q}_+,r\in\mathbb{Z}_+, denote \frac{1}{2}(a^2-b^2-c^2)-\frac{s}{r} by \Delta(\mathbf{v}). Let A be a positive real number.... 4answers 360 views ### Terrible accuracy of DawsonF DawsonF[30.] returns 0. The correct value is 0.016676... At least it prints a warning message, ... 3answers 148 views ### Using WhenEvent to Change the Sign of a Constant I am attempting to change the sign of a constant when a certain condition is met during a numerical integration. Here is the code: ... 1answer 61 views ### Taking a derivative of an eigenvector I'm trying to calculate the derivative of an eigenvector that I obtain by ... 1answer 87 views ### Help to extend this evaluation! I'm performing a stochastic evaluation, where i'm interested in the assymptotic behavior of the solutions, but my computer can't stand very large times. So I thought that I could evaluate a certain ... 1answer 58 views ### Numerical solution of an ODE using NDSolve I am to find the solution R(\rho) to the following differential equation, \frac{\partial}{\partial\rho}\left(A^2\frac{\partial}{\partial\rho}R(\rho)\right)-l(l+1)R(\rho)=0 where A is a ... 3answers 120 views ### How to solve these equations numerically? I have some differential equations as below. I have tried to solve them numerically with NDSolve: ... 1answer 92 views ### Solve PDE by using Spatial Discretization for two dimensional independent spatial coordinates I have a code given by ... 2answers 285 views ### Solving 2D+1 PDE with Pseudospectral in one direction with periodic boundary condition? According to the documentation about the pseudospectral difference-order: It says: Following the discussion here: I found the messy behavior is always on the artificial boundary in \omega-... 1answer 58 views ### How can I plot the solutions to this system of non linear ODEs? I need to solve the following system:$$\left\{ \begin{array} { l l } { (u')^2 + (v')^2 = 1 } \\ {u'v'' - u''v' = uu' + vv' } \end{array} \right.$$and it's a task that's proven to be quite hard by ... 1answer 73 views ### Numerical Inversion of an incomplete beta function expressed as gauss hypergeometric function using Mathematica I am currently working with this hypergeometric function {_2}F_1, \rho(r)=\frac{2b}{1-q}(1-(\frac{b}{r})^{1-q})^{\frac{1}{2}}{_2}F_1(\frac{1}{2},1-\frac{1}{q-1},\frac{3}{2},1-(\frac{b}{r})^{1-q}) ... 0answers 51 views ### What is the acceptable error in numerical calculations? [closed] I am doing a calculation where I try to simplify a very complicated complex function. I did this step by step and I checked that the numerical values that the function gets for certain values of the ... 2answers 191 views ### Solve gives an incorrect answer ... 2answers 227 views ### Unstable solution of 2D+1 time PDE with periodic boundary condition Now I am trying to solve the following 2D+1 type of PDE: \partial_t u(t,x,y)=-y\partial_{x}u+\partial_{y}\left[a y+b sin(x)u+c\partial_{y}u\right] with u(0,x,y)=\frac{1}{2\pi}e^{-((x-\pi/4)^2+y^2)... 1answer 115 views ### What is wrong with this MonteCarlo? [closed] I am making a trial for a MonteCarlo. In this code I simulate 10 protons hitting on a slab of gold: ... 1answer 85 views ### How would one go about plotting this parameterized curve using numerical resources (analitically it's too hard)? I'm working with the system of differential equations:$$\begin{align*} \left\{ \begin{array} { l l } { (u')^2 + (v')^2 = 1 } \\ {u'v'' - u''v' = -v' + u' } \end{array} \right. \end{align*} Where $... 1answer 110 views ### Non-linear numerical solution with variable parameter I have solved the following system non-linear: ... 1answer 67 views ### Machine Epsilon is not equal to$MachineEpsilon

I try to wrap my head around machine precision calculations in Mathematica (11.2, Linux). I do not understand the following behavior: ...
0answers
34 views

### Determine if nonlinear function can be positive subject to nonlinear constraints [closed]

I am trying to determine if a certain nonlinear function can be positive when the variables have to satisfy multiple nonlinear constraints. Currently my code looks like ...
4answers
126 views

### Suppress trailing 0s in numerical values

For example, this is what I want In:= N[Table[4^(i/4), {i, 1, 4}]] Out= {1.41421, 2., 2.82843, 4.} But if I want a few more digits only from the irrational ...
2answers
166 views

### Increase Performance of WhenEvent in NDSolve

I'm trying to reset the value of functions $u_{i}$ when they reach a threshold $θ$. Below the threshold, they evolve according to a simple differential equation. The $r_{i}$ resets the derivative to ...
0answers
270 views

### How to Solve this Fokker-Planck Equation?

I need to solve this Fokker-Planck equation in Mathematica and my attempt to perform this integration is above: My first attempt is above: ...
2answers
108 views

### Computing a sum with high precision

I am aware that a similar question has been asked, for example, here and here, but none of the proposed solutions solves my problem, so please wait before you mark this question as a duplicate. ...
1answer
261 views

### What happened to SequenceLimit?

In older versions of Mathematica, there was a function called SequenceLimit that allowed taking the limit of a numerical sequence. It is useful for speeding up the ...
1answer
46 views

### FindMinimum finds a zero value for solving a system but does not converges. Can I interpret it as the solution for system?

I am solving a system of three non-linear equations for three unknowns. I am using FindMinimum to minimize the norm of residuals of the system. I have played a lot ...
0answers
68 views

### Solve the 'Eigenvalue' problem efficiently [closed]

Usually, an eigenvalue of a matrix A is defined as |A-b*I|=0, where I is the identity matrix and |..| is for the determinant. Now my question becomes a little different, let's say A is a function of ...
2answers
262 views

### Solve PDE involving implicit function of independent variables

I have a differential equation given by -4*D[S[u,v],u,v]==V[u,v]*S[u,v] with boundary conditions ...
1answer
46 views

### Precision error in FindMinimum

I am trying to solve a system of three non-linear equations for three unknowns (e1, e2, phi). I am using FindMinimum to solve the system (I am minimizing the norm ...
1answer
66 views

### How to make Mathematica show small and large results? [closed]

I have two equations with x=r+Log[-1+r] and v=(1-1/r)/r^3 forms. When I substitute ...
1answer
97 views

### Problem with the function N with second argument

I was asked to look at a complicated definite integral that could be integrated analytically, but numerically did not behave as expected. After a lot of simplifications I arrived at the following: <...
1answer
75 views

### How can NDSolve be used to get just the positive or just the negative energy solution to the Klein-Gordon equation?

The Crank-Nicolson technique below is obtained from: "http://reference.wolfram.com/language/tutorial/NDSolvePlugIns.html" ...
0answers
49 views

### FindMinimum Error - cvec: Constrained optimization is only supported with scalar valued variables

I want to solve a non-linear equation derived with a forward march finite difference technique (defined as "f" in the code). I am using FindMinimum, since I know an approximate initial value for each ...
2answers
236 views

### Error when using NDSolve

I am trying to solve a system of differential equations as follows: ...
1answer
54 views

### Solving transcendental equation and plotting solution

I would like to solve ...
1answer
149 views

### NIntegrate: NumericQ and derivatives

I need to integrate a function with a singularity at the origin. I need this integration to happen quite fast, and while Integrate[] simply keeps on going forever, using NIntegrate with LocalAdaptive ...