# Tagged Questions

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

151 views

### Why Abs[Infinity] is an element of the real numbers

Element[Abs[Infinity], Complexes] returns False, that's right. But ...
73 views

### Handling Accuracy and Simplifying

I have the following problem. I have a system of non-linear equations that I log-linearize around a certain point, let's call it point A, using a function that I ...
143 views

### Series expansion of InterpolatingFunction obtained from NDSolve

I am trying to obtain a series expansion of the numerical solution of a differential equation. I encounter difficulties going beyond first-order expansions which I believe might be due to my inability ...
391 views

### High-Precision NSolve

I need to calculate the intersection of two curves f1[x_] := ((Zl ρ ) Exp[-x]) f2[x_] := (α k e^2 /x^2) Where ...
151 views

### How to speed up Min of DateObjects?

I'm in version 10.0.1 using a Dataset to do some plots and things. For one of the plots I need to get the minimum date of a some filtered set of the ...
34 views

### How to make a real number parameter go 2 decimal precision? [duplicate]

I'm new at community and I'm starting with Mathematica. I'm now having a trouble with a very simple problem which for many of you might be really obvious. In documentation ...
225 views

### NMinimize ignores constraints

I have a problem with NMinimize - I try to minimize quite a complicated function and use a couple of constraints (the way it is shown in the documentation). Now, ...
390 views

### How to find all roots of a complex number [duplicate]

Finding all roots, and I know there are four f them, of this (1 - i)^(1/4) Not only real, but imaginary as well
178 views

### RegionMember with some tolerance?

Can I specify some tolerance for the new geometric-computation function? RegionMember[Line[{{0, 0}, {1, 0}}], {.5, 0}] (* True *) While: ...
73 views

### Number recognition in Mathematica [duplicate]

Suppose that I have a number $n$ with many decimal digits of precision. What is the code to use to get Mathematica to recognize possible closed-form expressions for that number?
236 views

### Why does taking advantage of Listable change the results of a numerical computation slightly?

I have two variables: t0, and teta0. The first is computed using several nested sums, the second is computed taking advantage to ...
395 views

### Find the NullSpace of a matrix whose determinant is “almost” zero

If $A$ is a matrix such that $\det(A)=0$, it is easy to get a basis of the kernel of $A$ with NullSpace[A]. Now let's consider a matrix $B$, function of a ...
147 views

### Display All Output Numbers in HEX

How might I modify Mathematica such that I can get the following functionality when working with HEX values. The odd lines are input and the even output. Red values should be the HEX values. ...
86 views

### How to set products of small variables to zero

Say I have an expression which contains different product combination of very small variables, say, δA, δB, δC. I want to set all the products and all the ...
96 views

### Leave out a term when summing

I'm calculating the Madelung constant $$\alpha = -\sum_{n_1,n_2,n_3}{\frac{(-1)^{n_1+n_2+n_3}}{(n_1^2+n_2^2+n_3^2)^{1/2}}}$$ Where $n_1,n_2,n_3$ are any element in the integer domain and they can't ...
183 views

### Efficient way to obtain values of a function defined by an Integral

Consider the following equation: $$S(q)=\frac{(4 \pi \rho ) \int r (h(r)-1) \sin (q r) \, dr}{q}$$ I want to numerically obtain values for $S(q)$ given that I have data points representing $h(r)$ ...
42 views

### Numerical Error with Matrix operations [duplicate]

A is a 3x3 matrix, b is a 3x1 vector. I try to convert [A|b], a 3x4 matrix, to [I|0]. So the formula is right multiple ...
509 views

### A problem about fixed point iteration theory

Description Recently, I have been learning a couse called "Numerical Analysis". The fixed point iteration theory was introducted to solve the ...
127 views

### Applying N to the roots found by Solve gives complex numbers when the roots are real [closed]

I have a function which is f(x) = x^3 - 5 x^2 - x + 1. When I solve for x to find the zeros ...
278 views

### Fractal dimension of a large networked molecular system

I am trying to determine the fractal dimension of this complex biomolecule (figure attached). Any clues as to how this can be done. In trying to determine this quantity, I wonder how its ...
7k views

### Understanding differences between Maple and Mathematica in examples picked by Maplesoft

I am reading the document How Maple Compares to Mathematica. On page 15 there is an example where Mathematica produces wrong results. Does anybody know why? MAPLE: MATHEMATICA: Also on page 17 ...
203 views

### Rounding the coeffcients in a polynomial

I have a very large polynomial with Complex Numbers as coefficients. Due to many calculations, there are rounding off errors. I know however by theoretical considerations, that the coefficients are ...
1k views

...
119 views

### Determining the range of parameters that yield real values for a certain NIntegrate form

I have specified just one set of $s$ and $g$ values that yields a real value for the NIntegrate below. It is possible that some $s,g$ combination can give rise to ...
76 views

### Improving working precision of LegendreP[n,x]? [duplicate]

I was trying to evaluate N[LegendreP[5,0.1]] The cell gives me: N[LegendreP[5,0.1]]=0.178829 However I wanted more ...
335 views

### How do I feed data points into an equation to solve NUMERICALLY?

I start with this equation and solve it numerically for $z(x,y)$ in the range $1 < x < 5$ and $1 < y < 5$: $$\frac{3}{xyz} - 2x - 3y - 5z = 0$$ Then using the data points of $z$ above, ...
254 views

### NDSolve fails for certain choices of parameters and solve range

I'm trying to solve a pair of coupled ODEs with NDSolve. I know roughly what the solution should look like (both should give periodic functions, pi/2 out of phase, the amplitude of which damp towards ...
144 views

### Error when extending 1-dimensional PDE to 2 dimensions

I want to calculate how magnetic flux is trapped in a superconductor near the interface superconductor/vacuum. This problem already was solved analytically by J. Pearl for cylindrical symmetry (if ...
647 views

### FEM: Nicer Element Shape for Spherical Region

I'm trying to generate a mesh for later use in the Finite Element Method of the DSolve command. It is basically a parallelepiped with a spherical indentation. I'm ...
482 views

### Optimizing Monte Carlo simulation of a Pred-Prey model

My assignment and code As part of an assignment for one of my classes, I'm trying to run a "massive" Monte Carlo simulation in Parallel on the follow model: ...
100 views

### How to implement something like NMaximize[ NMinimize [ f(x,y) , {x} ], {y} ]?

Title says it all, really. I want to find some set of values for which a function of those values can't be made larger than a certain number, when some other values (on which that function is also ...
223 views

### Numerical error in Mathieu functions

Consider the MathieuCharacteristicA function, which is a piecewise function according to the documentation. The discontinuity happens at integer number. ...
193 views

### Solving determinant of a Kronecker product of matrices gives a numerical error - why?

I am doing the following steps (code at the end of the post): I start with a 2x2 matrix (smatrix), which is a function of a single variable (u2). I want to set the determinant of this matrix (...
138 views

### Bad numerical approximations

I'm trying to do some calculations here, but for some reason Mathematica starts using numerical approximations that are no good for my work. Specifically: ...
255 views

### Problem with machine number precision in compiled functions

When I compile a very big function and give it input the function returns error. I realized that this is because the value of the function becomes smaller than the smallest machine number. Is it ...
638 views

### Numerically integrating a list-valued function [duplicate]

I want to NIntegrate a List valued function foo[x] which is only defined for numerical ...
1k views

### How to solve fluid flow problem based on Navier-Stokes equations?

Does anyone know or can provide any examples how fluid flow problem can be formulated and solved in Wolfram Language? Simplest cases of 1D or 2D flows based on Navier-Stokes equations or even their ...
206 views

### Complex result for Real vectors in VectorAngle

I was expecting a real angle using VectorAngle when passing real valued vectors, but I obtained a complex angle: ...
4k views

### how to solve ODE with boundary at infinity

y''[x]-x y[x]==0 y[0]==AiryAi[0], y[infinity]==0 the analytic solution to this ODE is the Airy function y[x]=AiryAi[x] if I ...
271 views

### Problem with NDSolve in Mathematica 9 / 10

I'm having trouble by solving the following differential equation in Mathematica 9 and 10, where the code works fine in version 7: ...
245 views

92 views

### How to solve the warning problem and obtain real roots without imaginary part?

I am trying to solve a equation with Newton's method via FindRoot, and the codes are: Define the functions: ...
4k views

### Numerically solving Helmholtz equation in 2D for arbitrary shapes

I would like to solve the Helmholtz equation with dirichlet boundary conditions in 2 dimensions for an arbitrary shape. (for a qualitative comparison of the eigenstates to periodic orbits in the ...
260 views

### BitShiftRight produces incorrect results in Version 10

Bug introduced in 10.0.0 and fixed in 10.0.2 With Mathematica 10 for Mac, BitShiftRight works properly on lists of up to 100000 numbers, but appears to give ...
119 views

### How to handle infeasible points in FindRoot? [closed]

I am calling FindRoot[f[x,y],{{x,xInit,xMin,xMax},{y,yInit,yMin,yMax}}] where for some points {x,y}, ...
414 views

### How can I mend this broken heart?

Try to evaluate the following code: ...
129 views

### Finding a root of a parameterized integral

I have a function given as a parameterized definite integral: f[a_] := Integrate[BesselJ[0, x - a] BesselJ[0, x + a], {x, -∞, ∞}] I suspect it has a root near <...