Questions tagged [numerics]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
70 views

NDSolve: Which method for fast moving/spreading wavepackets?

I want to model a wave-packet interacting with a non-linear potential. ...
1
vote
0answers
18 views

How to dynamically increase sampling rate for NIntegrate?

I am trying to numerically integrate a messy function over the range $(0,\infty)$. Rather than integrating to $\infty$, I programmed a dynamic cutoff for which I can specify a desired precision. For ...
7
votes
1answer
145 views

Fastest way of numerically creating a list of dot products

I have a list of numerical complex 2x2 matrices list = {M[4,3],T[3],M[3,2],T[2],M[2,1],T[1]} (in reality this list contains over 1000 matrices and I have to do ...
1
vote
0answers
148 views

Implementing Kramers Kronig Relation in Mathematica for Reflection Spectrum

I'm new to Mathematica and I have to solve this problem but all of my approaches are wrong :( So, please can anyone help me with this equation? Here it is: Here is my data : https://pastebin.com/...
3
votes
1answer
38 views

What are some strategies for infinite numeric integrations with “cutoffs”?

I am working on a Mathematica project that involves many numeric integrals, each of which should be integrated over the domain {k, 0, Infinity}. I assumed that ...
3
votes
1answer
69 views

FindRoot and NDSolve question with multiple parameters

I'm trying to reproduce the results from 1, which solve the equations of an elastic ring (a closed loop elastica) under various loadings. Here is the relevant part: I need to solve the governing ...
5
votes
1answer
227 views

Why do the Integrate and NIntegrate give different results?

Bug introduced in 12.0 or earlier and persisting through 12.0.0 or later I'm using Mathematica to calculate the following integral, but I don't know why the result of using ...
3
votes
2answers
68 views
2
votes
1answer
68 views

Partial Differentiation in Mathematica, syntax error? [closed]

I am trying to differentiate some random function using Mathematica at particular nodes, I am though not being able to implement this without being retrieved the following error message: D: ...
6
votes
2answers
145 views

Plotting values obtained using numerical integration

I have an integral which doesn't give a closed definite expression. The command ...
1
vote
0answers
82 views

Plotting the surface spectral function

I'm not 100% sure if I should be posting this in the physics stack exchange but, I am pretty new to Mathematica, just installed it five weeks ago, and I am having a little trouble implementing the ...
0
votes
1answer
59 views

Which command can I use to obtain numerical solutions of a two-variable equation? [duplicate]

Regarding my previous question, which command I can use to obtain the numerical solutions of a general two-variable equation: f[x_, y_] := 0 for some specific ...
1
vote
1answer
56 views

Finding a polynomial fit to a set of data [closed]

I am trying to find a polynomial to fit the data listed as data = {{0,6.67},{6,17.33},{10,42.67},{13,37.33},{17,30.10},{20,29.31},{28,28.74}} I set this string ...
1
vote
1answer
67 views

Finding a Numerical Solution to a Linear Combination Inequality [closed]

Can I use Mathematica to find a value for $\alpha$ that satisfies the below linear combination inequality? If so, how? $$ \begin{bmatrix} -1 \\ -1 \\ -1 \end{bmatrix} < \begin{bmatrix} g_1 \\ \...
0
votes
0answers
46 views

Numerical integration of a function with singularity

I am trying to find the following integral numerically, ...
3
votes
2answers
585 views

How to obtain numerical solutions of a two-variable equation?

I have a two-variable function: f[x_, y_] := (4 y^2 - 6) (Cos[y π] Cos[x] - Cos[2 y π] Sin[x]) How can I find all the numerical solutions for $x$ and $y$ such ...
1
vote
1answer
62 views

Can I force `NSum` to sum exactly for many terms? [closed]

Is there a way to have NSum perform an exact term-by-term summation, when the number of terms is finite? I have a complicated infinite sum in which each term ...
7
votes
0answers
91 views

Computing log-determinant?

Mathematica does-not have a function to compute the log-det of matrix? Naively computing Log[Det[M]] can be numerically unstable.
3
votes
1answer
96 views

Mathematica unable to evaluate function which it can write explicitly in simple form

I have a function $\psi(x,n)$ in mathematica which is quite complicated. However, plugging in $n=0$ gives a simple form. Mathematica knows this (see below), however it is still unable to even evaluate ...
2
votes
2answers
92 views

How to use NIntegrate inside FindRoot?

I am trying to use FindRoot on functions that involve NIntegrate, and Mathematica is throwing undesirable errors even when it ...
3
votes
4answers
84 views

RecurrenceTable for systems of linear difference equations

I'm working on a project that involves developing a financial forecasting model. The equations used in the model will largely be linear difference equations (estimated via some form of regression ...
0
votes
0answers
43 views

How to solve this system of coupled differential equations (numerically) [duplicate]

I am trying to solve this system of coupled differential equations, code: enter link description here The problem is when I run the code, it appears: NDSolve::ndode: The equations {True} are not ...
0
votes
0answers
76 views

How to solve numerically this system of coupled differential equations

I am trying to solve this system of coupled differential equations, ...
1
vote
0answers
20 views

Numerical evaluation of derivatives of pair

I have a set of ordered pairs. How can I take calculus action on that like derivative or integration? $$ N(E) = \{(2, 3), \cdots \} : N=2 , E=3\\ \mathrm dN(E)/\mathrm dE = ? $$
0
votes
0answers
57 views

gradient of a numerical function

Is there a way other than interpolation to evaluate the numerical differentiation using Mathematica? I have a function A(x,y) and I want to obtain the gradient of this function. ...
0
votes
1answer
144 views

Solving a system of Non-linear equations by Fixed Point method or Newton Raphson method

I have a system of five equations with ten variables, i.e., the radial distance $r$, polar angle $\theta$; four spin vector components ($St, Sr, S\theta, S\phi$) and four momentum components ($Pt, Pr, ...
3
votes
0answers
54 views

Evaluating Lauricella functions of Third kind numerically in Mathematica

Let's consider the Lauricella function of third kind, denote as $F_{C}(a,b;c_1,...,c_n;x_1,...x_n)$ in MathWorld. Is anyone aware of an algorithm that allows to numerically evaluate such a function ...
3
votes
2answers
187 views

How to merge two or more curves smoothly?

I have plotted three curves. For each range of $x$, one of those curves is true. On the other hand, finally, the result must be a unified curve. Is there any command to unify these three curves? ...
1
vote
2answers
53 views

Truncating digits after calculation

I am working on numerical solutions to PDEs. I get some outputs which I then place back into the original equation to check my answers against expected values which are the original inputs. The ...
0
votes
0answers
40 views

Plotting Interpretation

...
1
vote
0answers
88 views

NDSolve issue, potential singularity or stiff system

I have the following parameters, equations, and NDSolve solution set up as such: ...
0
votes
1answer
83 views

Calculate sensitivities of differential algebraic equation [closed]

I would like to calculate sensitivities for a DAE. The DAE can be solved in Mathematica by: ...
6
votes
1answer
126 views

Nonlinear differential equation with unknown parameter and integral form boundary condition

I'm trying to solve numerically a non-linear problem in order to determine the velocity field ($U$) and the film thickness ($h$) of a non-Newtonian fluid over an inclined plane. The equations are, $$\...
1
vote
2answers
113 views
7
votes
3answers
299 views

Embedding non-orthogonal vectors in a vector space

Consider unit vectors $|v_i \rangle$ on an $n$ dimensional vector space, which obey the following relation: $$\langle v_i|v_i \rangle =1 \quad \& \quad |\langle v_i|v_j \rangle| \leq \epsilon, \...
4
votes
1answer
68 views

Using preconditioners efficiently

I am trying to numerically solve a linear system of equations of the form A x = a where A is really ill-conditioned and ...
0
votes
1answer
46 views

Solving two equations with logarithmic terms with NSolve

I want to solve the following set of equations for $M$ and $\epsilon$ : ...
1
vote
0answers
68 views

Why did LinearSolve give me two different results?

Given that I have a sparse array as follows: ...
2
votes
2answers
218 views

Solving a Reaction-diffusion system

I'm just a beginner in Mathematica software. I have version 12. I am looking for a program that will solve a prey-predator system with diffusion. My problem is that I tried a previously posted ...
0
votes
1answer
70 views

Plot a family of solutions of ODE with singularity

In the post Use Mathematica to plot the flow of an ODE with discontinuity, the following ODE with discontinuous coefficient was solved ...
4
votes
1answer
88 views

Solving a transcendental equation with FindRoot and making a contour plot

I have the following functions, ...
2
votes
1answer
42 views

Plot solution of ODE with singularity

I wish to plot the solution of the following ODE: ...
8
votes
1answer
211 views

Nonlinear elasticity PDE in Mathematica 12

Mathematica 12, Windows 10. I am trying to solve a PDE in one spatial dimension $R$ and time $t$. I need a solution for displacement $r(R,t)$, radial Cauchy stress $T_{RR}(R,t)$, and radial growth $\...
7
votes
1answer
86 views

How to help NDSolveValue handle the addition of another dependent variable in a set of reaction-diffusion equations

I am trying to use NDSolveValue to solve a system of coupled reaction-diffusion equations in a 2D space (technically 3D cylindrical coordinates, but due to radial ...
1
vote
0answers
35 views

Problem with an infinite sum

I need to calculate a coefficient as follows coef[a_, j_] := E^(-a^2/2) NSum[(a/Sqrt[2])^n 1/Sqrt[((n - j)!) (j!)], {n, j, Infinity}] This coefficient is an ...
2
votes
2answers
169 views

Error test failure when solving two coupled ODEs

by NDSolve; this is work until y=6.22 ...
3
votes
1answer
70 views

About the accuracy of Method -> FiniteElement in NDSolve, version 12.0

In this question, the equation $uu'=\nu u''$, $x\in (-1,1)$, $u(-1)=1+\delta$, $u(1)=-1$, was considered. The question asked about how to solve this differential equation problem in Mathematica. There ...
1
vote
1answer
49 views

Problem when using NMinimize in a RecurrenceTable

I have a problem when I'm trying to use NMinimize in my RecurrenceTable, like in this example : ...
1
vote
2answers
117 views

Draw characteristic lines of ODE $\dot \gamma(t) = \sqrt{|\gamma(t)|}$ and highlight some of them

Consider the ODE $$\dot \gamma(t) = \sqrt{|\gamma(t)|}$$ with initial data $\gamma(0) =x_0 = -c^2$. The solutions of the ODE are not unique because one has $x(t) = -(t/2 - c)^2$ for $0 \le t \le 2c$, ...
0
votes
0answers
25 views

NMaximize scrambles constraints

There have been lots of questions around regarding the issue that NMaximize/NMinimize may give results - or at least evaluate ...

1 2
3
4 5
32