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

learn more… | top users | synonyms (1)

0
votes
0answers
63 views

how to solve a differential equation

I am trying to solve the following differential equation: ...
0
votes
0answers
25 views

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

im new at community and im starting with mathematica I am now having a trouble with something very simple problem which for many of you might be really obvious In documentation "N" suppose to give me ...
0
votes
0answers
88 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, ...
0
votes
1answer
68 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
0
votes
0answers
41 views

How to make an effective use of Mathematica to evaluate integrals, series, recognize closed forms, and do other manipulations [closed]

I would like to know if there are resources to learn how to use the functions of Mathematica in the most effective way in order to evaluate difficult integrals and series or find possible closed forms ...
4
votes
4answers
128 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: ...
0
votes
1answer
33 views

Error messages from NIntegrate [closed]

I've been trying to work on some integrals (Actuarial Science, for those interested) but somehow this always returns an error for me. ...
2
votes
0answers
48 views

Number recognition in Mathematica [closed]

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?
5
votes
1answer
122 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 ...
0
votes
0answers
37 views

Why NDSolve With Orthogonal-Projection Method On Orr-Sommerfeld Equation Does Not Work(?)

I am attempting to solve the Orr-Sommerfeld equation for plane Poiseuille flow with the Orthogonal Projection method within NDSolve. The Orr-Sommerfeld equation is (a "stiff" problem); $\psi''''(x) ...
3
votes
1answer
73 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 ...
5
votes
2answers
106 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. ...
1
vote
1answer
62 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 ...
3
votes
1answer
65 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 ...
7
votes
2answers
142 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)$ ...
0
votes
0answers
31 views

Numerical Error with Matrix operations

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 ...
1
vote
1answer
88 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 ...
6
votes
1answer
142 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 ...
3
votes
2answers
147 views

How to define even permutations correctly?

I define even permutations as following, but there may be some error. I use it in two different way and get different output. ...
3
votes
2answers
171 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 ...
5
votes
1answer
102 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 ...
2
votes
1answer
50 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 ...
2
votes
2answers
200 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, ...
1
vote
1answer
101 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 ...
1
vote
0answers
48 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 ...
9
votes
2answers
380 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 ...
6
votes
1answer
267 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: ...
3
votes
1answer
65 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 ...
0
votes
0answers
51 views

How to deal with matrices involved in system of SDEs?

This question is in continuation of the the previous posts Solving Stochastic differential equation and Fast Simulations with Compile. What I want to do is numerically solving the epidemic model which ...
3
votes
3answers
117 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 ...
3
votes
1answer
109 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: ...
6
votes
3answers
100 views

Numerically integrating a list-valued function [duplicate]

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

Navier–Stokes equations [closed]

how write Stokes equation in mathematica? the Stokes equation is in in this link http://en.wikipedia.org/wiki/Navier-Stokes_Equations
5
votes
2answers
319 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 ...
1
vote
0answers
157 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: ...
2
votes
1answer
119 views

How can I reduce computation time while still obtaining a good approximation for my function?

I am new to any CAS (and Mathematica, for that matter) and new to StackExchange too, so forgive me and correct me on any mistakes. I have this function: $J_p=\sum_{m,n=1}^{\infty} ...
1
vote
1answer
90 views

Whats the most efficient way to solve an equation numericaly (because it has no analitical solution)

So, I think the problem that Im having is simple but, still, Im not sure on how to do it. I have an equation with no analitical solution: $a_1 \sin \left(2 \theta \right)+a_2 \sin \left(2 ...
1
vote
2answers
124 views

Higher derivative [closed]

Is there more efficient way to rewrite this code in order to compute 2nd and higher derivatives of r=sqr{x^2+y^2+(z-a)^2}? ...
1
vote
1answer
67 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: ...
1
vote
1answer
47 views

How to get only the real solutions of an equation? [closed]

Is there any simple way to get only the real solutions of the eq. x^3-1=x? I've tried: Solve[x^3-1==x,x] But it gives the complex ones, too. I have Mathematica ...
2
votes
1answer
128 views

How to determine Fixed Point of a function? [closed]

A function is defined as f[x_]=Sqrt[1-x^2]. How can I determine the fixed point of f? I've tried this: ...
35
votes
2answers
1k 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 ...
18
votes
1answer
203 views

BitShiftRight produces incorrect results in Version 10

With Mathematica 10 for Mac, BitShiftRight works properly on lists of up to 100000 numbers, but appears to give incorrect results when threaded over lists of 100001 ...
2
votes
0answers
71 views

How to handle infeasible points in FindRoot?

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

How can I mend this broken heart?

Try to evaluate the following code: ...
0
votes
0answers
73 views

Plotting Geodesics in Kerr

I'm interested in plotting the trajectories of null geodesics near a rotating black hole (given by the Kerr solution) which involves a system of first order differential equations. Some Context (not ...
2
votes
1answer
89 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 ...
2
votes
1answer
112 views

Mathematica unable to solve equation numerically while Wolfram|Alpha can

I want to solve the following equation 2 x == Sinh[x] Mathematica is unable to do so ...
2
votes
1answer
86 views

Numerical evaluation of ChebyshevT

When I evaluate the following Chebyshev series of the first kind in two different ways, I get two very different results: ...