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
1answer
32 views

Find parameter value for which sharply-peaked constrained 3d-integral equals 1

I want to find the value (desirably to high-precision) of the parameter $i$ for which the constrained 3d integration ...
1
vote
1answer
75 views

NSolve results in imaginary solutions for Physical System

I have the following function: F[z_,V_] := (h*c*Pi^2*A)/(240*z^4) + eps*A/(2*z^2)*V^2 - k*(g - z); It's a pyhsical force that depends on the voltage "V" and the ...
2
votes
0answers
57 views

Why is the sum of the series calculated using the integral

I tried to calculate the sum the Harmonic series via NSum up to a huge limit and got an error: NIntegrate: Numerical integration converging too slowly; suspect one of the following: singularity, ...
0
votes
1answer
51 views

How to increase the number of decimal places for this code?

How do I increase the number of decimal places for ...
3
votes
1answer
55 views

How to make small value exponentials default to zero?

I have a function f[t_] := Exp[N[-(t - 30.)*(t - 30)/100]]. When I tried to evaluate f[600] it shows ...
9
votes
4answers
495 views
19
votes
3answers
411 views

Inverting differential equation using finite element methods

tl;dr; How to use FEM tools to extract models needed to invert PDEs. Context In astrophysics, one is interested in so-called 'cosmic archeology' which involves recovering the origin of a given ...
0
votes
0answers
69 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
17 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
138 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
129 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
63 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
212 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
1
vote
1answer
64 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
75 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
54 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
61 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
564 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
59 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
88 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
74 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
73 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
52 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
141 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
51 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
185 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
87 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
119 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
112 views
7
votes
3answers
295 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
199 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
68 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
82 views

Solving a transcendental equation with FindRoot and making a contour plot

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

Plot solution of ODE with singularity

I wish to plot the solution of the following ODE: ...
8
votes
1answer
207 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 $\...

1
2
3 4 5
31