# Tagged Questions

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

500 views

### Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
99 views

### Numerical derivative from data points

I want to take the second derivative of a set of data points (at the point $x = 0$). Let's assume that this set looks like that ...
66 views

### Accuracy limitations of singular value decomposition?

in the process of working on a physics problem I have found the need to use the singular value decomposition function built into Mathematica. I have encountered what seem to be limitations to the ...
118 views

### Mathematica Precisions vs Doubles in C/C++

I'm having a bit of an issue regarding numerical precision and I'm not sure how to deal with it. I have a certain randomly generated matrix, say $M$, that I wish to compute the eigenvalues. The ...
45 views

### Problems with numerical solution of differential equation

I'm trying to obtain a numerical solution for my differential equation. But i have the following mistake: Encountered non-numerical value for a derivative at z == 0. Can somebody help with that? <...
91 views

### FindMinimum step size too small

I'm running a simulation of an electromagnetic system using Radia, an external code that is run from Mathematica. I want to use FindMinimum to determine some ...
295 views

### What can one do with extremely stiff problem in NDSolve?

Consider the following illustrative problem: $$\frac {\partial f} {\partial t} = \frac {\partial} {\partial x}(x f) + \frac {\partial} {\partial x}(f \frac {\partial f} {\partial x})$$ This is ...
350 views

### How to calculate accurate answer in Mathematica?

I accidentally discovered for myself, that Mathematica outputs inaccurate answer. For instance, if I take $\sin(2 \cdot \pi \cdot 0.5) = 0$, then in Mathematica it is: But if I calculate it on ...
60 views

### Precision in calculation [duplicate]

I am writing some code to demonstrate the effect of the number of significant figures a coefficient has on the solution of a nonlinear equation. I define the coefficient as follows: ...
43 views

### Difficulty in replacing variables with list of variables for a function for FindMaximum application

FindMaximum gives incorrect answer when I redefine a function by changing its arguments from variables to a list of variables. The code goes as follows ...
125 views

### How can I solve a Hamiltonian with numerical methods?

Hamiltonian in terms of two level atom's operator (0 is ground state and 1 is excited state) which are 2*2 matrices and cavity modes are given by $a$ and $a^\dagger$. Rest of the parameters are ...
57 views

### Transform a variable's exponent from an exact rational to an inexact decimal

here is a little problem I could not find a solution for. I have a variable with an exponent represented as a fraction, for example, var = a^(39/106) Now I ...
64 views

94 views

### How to find the integrand singularity points when having NIntegrate::slwcon:

In order to calculate the closed area of the curve below defined by parametric equation curve02, ...
50 views

### My NIntegrate expression returns a wildly inaccurate value

I am trying to integrate a function using NIntegrate: ...
138 views

151 views

### Evaluate numerically an extremely small number

How to evaluate numerically $e^{-4 \cdotp 10^{35}}$ in the form $0,a_1a_2...\times 10^{-n}$ ...
268 views

### What is the fastest way to compute digits of $\pi$ using Mathematica?

There are a lot of ways to calculate digits of $\pi$ using Mathematica. The most naïve way I can think of is N[π, 100000000] Of course, there are a lot of fast ...
40 views

### solving with numerical methods [closed]

Hi I would like to solve the equation below in Mathematica.Since I am a beginner I can not solve it with NSolve and Solve.I don't know why.Do you have any idea?! ...
44 views

### EvaluationMonitor and variables with indices + subscripts

I have encountered the following problem while using EvaluationMonitor with NMinimize: variables that have both a subscript and an index, e.g. Subscript[x,y][1] do ...
161 views

### Plotting Planck's function and unexpected results

I have the code below. If you look at the plot, you can see a strange behaviour. The function goes to zero as λ->0 but you can see the plateau below ...
64 views

### Can't sort my list numerically for larger numbers than 10 e.g. 1,10,100,2 [duplicate]

I want my files names in real numerical order so 1,2,3,10,12. However it is currently putting them in order like so: 1,10,12,2,3 Input: ...
74 views

### Low accuracy while solving a multi-variable equation numerically

My question is as following: I was trying to make a function Vs2[r] with two parameters fit a set of conditions. Vs2[r]: <...
75 views

### Split Boundary Value Problems win Algebraic Equations

Is it possible at all to solve with NDSolve (or other built in function) a split boundary value problem with algebraic equations? Please look at the following example: ...
256 views

### Rotating an Interpolating Function

I have used the following code to generate eigenfunctions of a PDE: ...
304 views

### Non Standard Eigenfunction Plots of the Laplacian Over the Unit Square

I have recently been plotting eigenfunctions of the laplacian over the unit square using the NDEigensystem command. However, I have noticed something in the plots ...
101 views

### Classification problem using SVM methods

I am running SVM on mathematica and I a used this code with classes: ...
130 views

### Basic 2D convolution with mathematica

Can anyone tell me why the following keeps burning my CPU without ever producing the desired plot? ...
837 views

### Exponential fitting - isn't actually a BUG there?

There are many questions on this site about wrong exponential fitting in Mathematica but no one considers this well-known problem as a potential bug. Usually people suggest well-known workarounds ...
105 views

### Numerically Solving Helmholtz over the Rectangle - Why does this code only give eigenfunctions of the form $u_{m1}$ [closed]

I have been following the method for numerically solving the Helmholtz equation in this example (the answer by User21) and have come across two problems. I have been implementing the method for a 2x1 ...
155 views

### Smooth initial data

I need something that produce pseudorandom smooth initial data for modelling phase separation equations (Cahn-Hilliard and simular). Generator code for now: ...
61 views

### Computing the logarithmic spectral norm rapidly

I wish to compute the logarithmic spectral norm of a square matrix $A$, which is defined by $$\mu_2[A]=\lim_{t\downarrow0}\frac{\|I+tA\|_2-1}{t}.$$ Hence, I simply code ...
35 views

### How do I numerically integrate the result of NDSolve if it depends on several variables?

I am trying to numerically integrate solution of NDSolve. I am trying to integrate my result of NDsolve in line 97 of my notebook, but am getting the error ...
95 views

### How to fit parameters, not functions?

Given a set of parameters ...
80 views

### Solving numerically a system of equations using different methods

I will use, as an example, the simple Henon-Heiles potential ...
75 views

### Paramter Scans and $\chi^2$ Test in Mathematica

Is there any in-built function or a recommended package that enables one to find, say, 10 Parameters, which are used as boundary conditions in NDSolve, that minimize $\chi^2$? ...
45 views

### Differential equation for a list with parameter dependent function

I am having a differential equation: y' = (1 - y) - f[y, mu] y; f is a hysteretic function that depends on y and on the derivative of y: ...
71 views

### Integrate over FindRoot solutions

I have a function of bivariate normal PDF and its marginals defined as ...
260 views

### Trouble with shooting method for a 4th-order stiff ODE

The ODE I need to solve is $$\left(y^3y^{\prime\prime\prime}\right)^\prime+\frac{5}{8}xy^\prime-\frac{1}{2}y+\frac{c}{y}=0$$ where $\prime$ denotes differentiation, $c$ is a constant and $0<c\le1$....
62 views

### LinearSolve on non-square matrices?

I just came across a strange behaviour for LinearSolve (on Mathematica 8.0.0.0). Consider the following definitions: ...
203 views

### Maximized value of a function as an additional constraint on a variable

I want to maximize a function $f(b, h)$ with respect to its arguments and subject to some additional constraints. If these constraints are satisfied, $f$ is increasing in $h$. I then want to find an ...