Questions tagged [numerics]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
94 views

Numerical integration of MeijerG function with variables

I applied the integration, How to solve the function which is mentioned below. here, 'theta' is the only variable. q13, q1,q2,p,qi1 are all variables will take value from the loop ranges from 0 to 2, ...
1
vote
2answers
49 views

Evaluate function at “good” points used by Plot in numerical problems

Plot function with option Mesh->All shows how mathematica evaluates function to make it most optimal for plotting. I'd like to evaluate some physical function in ...
2
votes
1answer
120 views

Using functions instead of lists in physics numerical problems

I'm using the following code for calculation of reflection and transmission coefficients through square well potential: ...
3
votes
1answer
235 views

Some Strange results from MMA and Matlab

Recently I am repeating a numerical discrete Fourier transform. Since this problem is related to a real experiment. So the authors use some complex functions to fit the results. Below formula is the ...
1
vote
0answers
37 views

NDSolve and Explicit Runge-Kutta method [duplicate]

Welcome all, I have a comment to explain how my system solver. My response was to add ...
0
votes
0answers
39 views

How to read Z == 0. - 0.00162663 W

I am solving a set of three linear equations with four variables and found out the values of X, Y and ...
25
votes
6answers
5k views

Mathematica vs. MATLAB philosophy [closed]

During a typical (possibly with alcohol mixed) discussion among some academic peers in regards to numeric calculation and general modern use of computers in science and engineering settings, it become ...
6
votes
2answers
170 views

Time dependent delay differential equation

The command NDSolve is really good at solving delay differential equations. $$x'(t)=x(t)(1-x(t-d))$$ ...
0
votes
1answer
79 views

Root finding: Is there no bisection method root finder?

I am trying to find a root to an equation f[k,...]==0 numerically, where k is the variable I am solving for. Using both NSove as ...
4
votes
1answer
111 views

The NIntegrate cannot give a correct answer by Mathematica

Here I want to compute this integral using the Mathematica $$\int_0^\infty \int_{-\pi}^{\pi}s^{\frac{1}{2}+2} \exp (-s) \cos \left(\frac{f}{2}\right) \exp (-i k s) \exp \left(-\frac{\sqrt{8 s u}}{\cos ...
0
votes
0answers
44 views

Pole in the solution of four coupled non-linear ODE using NDSolve

I have four coupled non-linear equations denoted as A1[ω4], A2[ω4], A3[ω4],...
2
votes
1answer
94 views

1-D prey-predator system with diffusion and time-dependent parameters in Mathematica 12

Please you find attached a Mathematica program for the existence of almost periodic solutions for a class of Lotka-Volterra prey-predators systems with diffusion and time-dependent parameters in ...
1
vote
2answers
55 views

ParametricNDSolve for a system of 4 non-linear ODEs and plotting the solutions

I have four coupled first-order non-linear differential equations, denoted as: A1[x], A2[x], ...
0
votes
0answers
34 views

Using NDSolve for 2 ODE but plotting one dependent function against another

Suppose I have two ODE functions y[x] and z[x] which are obviously dependent on x. It is ...
3
votes
1answer
113 views

Problem with NDSolveValue : “The function value {$Failed} is not a list of numbers with \ dimensions…”

I was having fun modifying a code given to me as an answer to a previous problem here, courtesy of user Alex Trounev (Thank you again), when I encountered a certain error which I had never seen before....
0
votes
0answers
89 views

Plotting a complex integral function [duplicate]

Can anybody help me to plot the T1 and T2, please? The problem is that the integral part becomes so huge or indeterminate at ...
1
vote
0answers
36 views

Speed up Multidimensional numerical integration

I have the following 9-D integral, where the domain of integration is a nine-dimensional hypercube of unit length. The problem is that Mathematica takes too long to evaluate this. Is there any ...
2
votes
1answer
73 views

Finding “missing” solutions of differential equation with NDSolve

I was working with NDSolve, and suddenly this question, appeared, so I decide to try something: Define a differential equation: ...
3
votes
1answer
125 views

Numerical Integration over experimental numbers

I have a large array {x,y,z} sigma = {{x1,y1,z1},{x2,y2,z2}, ......} where z is a function of x,y: z = f(x,y); the function is known only through its numerical ...
9
votes
2answers
161 views

Problem with Binomial numerical computation

Using Mathematica 10.4.1.0 I have a problem with Binomial on numerical computations. Both of the following correctly return 1.0 as the result: ...
0
votes
0answers
38 views

Inconsistent and oscillatory behavior with formula

I have the following code ...
1
vote
1answer
51 views

NumericQ slows down the computation in ContourPlot

I am trying to plot the roots of a function f(x,y) using ContourPlot as follows ...
3
votes
0answers
74 views

Problems with Erf for large arguments with small imaginary part [closed]

While performing some higher precision calculation, I noticed that Mathematica 12.1 killed the kernel and cleared all prior definitions. The problem was with Erf ...
1
vote
1answer
107 views

Translating pseudocode for the Jacobi algorithm into Mathematica

Here is an image for the Jacobi algorithm. I have almost no knowledge of Mathematica, the textbook does not help. Does not provide examples. The class average is 64%. I just want to be able to ...
2
votes
1answer
101 views

LeastSquares vs ArgMin

From the documentation, we learn that: LeastSquares[m,b], when b is a vector, is equivalent to ...
2
votes
1answer
90 views

How to run NDSolve over a large range without freezing?

I am trying to solve a set of coupled differential eqns. I need the solution over a large range of the variable t. But the notebook freezes and stops working. ...
3
votes
0answers
60 views

Why this change gives different results in Integrate?

I'm new in Mathematica and can't understand why changing a number from Real to Integer is giving different results in my equations: ...
1
vote
1answer
73 views

Machine-precision numbers cause loss of precision

I am trying to use the Mod function as follows. Table[ Nest[Mod[2 #, 1] &, FractionalPart[Pi], n], {n, 100}] // N ...
7
votes
1answer
138 views

Multi-variable Fixed Point Iteration Command?

We want to find the zeros of a multi-dimensional function f[x_, y_] = {x + 1/4 (-Cos[x] + Sin[y]), x - y - Sin[y]/4} To find the zeros, we can initialize and ...
1
vote
1answer
56 views

ParametricNDSolve “delayed time” error message

Issue reported to Wolfram, Inc as a possible bug in Version 12.1; CASE:4554034. When trying to solve a system of delay-differential equations with ParametricNDSolve...
1
vote
2answers
115 views

Does SetPrecision[x, Infinity] expose the internal exact number in the approximated number?

What I already know (maybe) : My theory about Mathematica's way of implementing approximated number An number approX with arbitrary precision ...
6
votes
0answers
66 views

What makes ListPlot better than N?

I wanted to numerically verify the validity of the formula for the first Stieltjes constant $$\gamma_1=-\frac12\sum_{n=0}^\infty\frac1{n+1}\sum_{k=0}^n\binom{n}{k}(-1)^k\log^2(k+1)$$ ...
1
vote
1answer
34 views

Can I configure a guaranteed precision for NIntegrate on a monotone function?

I know there are some great posts already about why PrecisionGoal->n doesn't guarantee the result of NIntegrate will actually ...
2
votes
1answer
62 views

Calculating the bounce solution numerically

I would like to obtain a numerical solution to the following example bounce equations, $$\begin{align*} \frac{\partial^2 a}{\partial t^2} &= \frac{1}{t^2} a(1-a)(1-3a)-\frac{b^2}{2}(1-a)\\ \frac{\...
1
vote
1answer
42 views

Division by a series with no coefficients

I know it is strange, but it seems MA is unable to compute a simple series expansion ...
3
votes
3answers
334 views

How can I compute Erf of large numbers to more precision?

I would like to compute Erf[80/3] to enough precision to know the order of magnitude of 1 - Erf[80/3] How can I do that? I ...
2
votes
0answers
29 views

Find at least one distribution with given parameters [closed]

There is a continuous probability distribution that I have only limited information about. I know that its PDF is a smooth unimodal function with exactly $2$ inflection points; I also know numeric ...
4
votes
1answer
105 views

Solve free boundary problem for heat equation

How can I use Mathematica to compute/approximate and plot the solution of the following problem? $\min\{u_t - u_{xx} -1, u \} = 0 \text{ in } (0,T)\times (-1,1)$ $u(0,\cdot) = 0 \text{ in } (-1,1)$...
0
votes
2answers
86 views

How to prevent this overflow error?

I compiled the following Mathematica code ...
2
votes
2answers
100 views

Can I impose some a priori constraints on a distribution found by SmoothKernelDistribution?

I use SmoothKernelDistribution (with no options and a single argument — a list of values) to get an approximate reconstruction of a continuous distribution based on ...
1
vote
1answer
58 views

NArgMax plotting partially wrong solution

In the following MWE, NArgMax finds the correct argmax (br1) as a function of the parameter ...
10
votes
5answers
600 views

Why does NMaximize miss this global maximum?

I am having trouble maximizing a function which appears as a curvature of a planar curve. ...
0
votes
0answers
63 views

Numerical evaluation expression not returning result in requested precision

I have a long list of descriptive statistical quantities for a univariate list of data. The problem is that the set number of significant figures is ignored by the ...
0
votes
1answer
84 views

Global optimisation - Error bound on NMaximize?

Is it possible to obtain an error bound on NMaximize? e.g. convert the number returned by NMaximize into a rigorous upper bound ...
2
votes
2answers
67 views

RegionBounds wrong with small change

For the following: RegionBounds[ImplicitRegion[0 <= y <= Sqrt[1 - x^2], {x, y}]] I get the correct value of ...
1
vote
1answer
31 views

How to get the output for the following code involving differentiation and integration?

I need to evaluate the following Mathematica code to get a numerical value as my output. But during compilation I get the error message NumericalMath`FixedPrecisionEvaluate::precbd: Requested ...
1
vote
1answer
47 views

How to stop the result?

My program allows me to solve the equation Ht. The aim is to show the probability for each value of d value in my dlist table (dmin and dmax). But, for certain values ​​of d, I have a first negative ...
0
votes
2answers
84 views

Why code is running and not giving any output for NSolve?

I am trying to solve the given equation in the code and want to plot 'N1' with 'P1'. But the code is not giving me any output and still showing running. What is the problem with it? If anyone can ...
2
votes
1answer
85 views

A probable misdescription of official Doc about $MachinePrecision?

According to the official documentation: When you enter an approximate real number, the Wolfram Language has to decide whether to treat it as a machine number or an arbitrary‐precision number. Unless ...

1
2
3 4 5
33