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

learn more… | top users | synonyms (1)

-1
votes
1answer
44 views

How to extract data of large function

Here I have one problem with command for I guess, but I am not sure. If I have function f[x] but not enough ram memory to save it in closed form, how to make code to compute it for chosen values. It ...
1
vote
3answers
84 views

Making a calculation with high precision

I would like to make the following calculation: 1/Sqrt[1 - (150^2 10^(-4))/(9 10^16.)] - 1 Mathematica 8 returns 0. The result is obviously not 0, but my ...
-2
votes
0answers
52 views

FindRoot don't find my root! [closed]

Im working with these functions ...
2
votes
0answers
55 views

Speeding up a numerical constrained quadratic optimization

I'm trying to solve a quadratic optimization problem in 35 variables, $\vec{α} = \left< α_1, \ldots, α_{35}\right>$: $$ \begin{aligned} &\operatorname*{maximize}_\vec{α}&&1.0\cdot ...
2
votes
2answers
87 views

Strange Behavior of NDSolve

I am trying to evaluate the following ODE numerically: ...
2
votes
0answers
31 views

NIntegrate/NSum with parameters [duplicate]

I'm trying to calculate a continuous integral within a discrete integral. Something similar to this (yet more complex): ...
0
votes
1answer
134 views

DAE - varying initial conditions

I want to solve a DAE-system and I want to vary more than one initial conditions and to manipulate them. I looked here: Putting NDSolve into ParametricPlot But it does not work: ...
4
votes
2answers
105 views

Numerical sum does not give consistent results

Consider the function ...
0
votes
1answer
68 views

Which function not giving numerical answer [closed]

Here's my problem: My functions: ...
0
votes
0answers
62 views

Mathematica not giving numerical answer [closed]

Here's my simple function: ...
7
votes
0answers
140 views

Numerically solve 2nd order differential equation with singularity

Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example: $$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$ where ...
28
votes
1answer
487 views

How to compare power towers in Mathematica?

First I tried it directly, but it overflowed: ...
10
votes
1answer
219 views

Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?

I am trying to evaluate this integral numerically $$ \int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q $$ for large values of $R$. This makes the integrand oscillate more quickly and Mathematica ...
1
vote
1answer
167 views

Why is arithmetic faster for inexact arithmetic?

I have been trying to compute eigenvalues of a rather sizable matrix A, about $500 \times 500$ (but sparse). I asked Mathematica to compute ...
1
vote
1answer
94 views

why there is a small imaginary part [closed]

I encountered a problem. I have a eigenvector eigvsI[1] ...
4
votes
1answer
73 views

Minimize failing on a polynomial

Calling: Minimize[{-0.4877 - 0.1190 r^2 - 0.1885 r^4 + 2.9703 z - 0.5531 z^2, 0 <= z <= 3.5 ∧ 0 <= r <= 1.75}, {r, z}] returns ...
1
vote
0answers
114 views

Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations

I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...
3
votes
0answers
119 views

FindRoot gives a wrong solution which obviously should not be there

I got stuck on FindRoot and I didn't see any similar problem posted, so let me explain what I am trying to do and what problem I meet here. I try to find roots of a particular function, which in the ...
0
votes
0answers
41 views

How to force evaluation/numerical result of a function? [closed]

I defined a function m[x] using ...
4
votes
1answer
166 views

NDSolve for a large system of simple ODEs

I am solving a system of many (more than 100) ODEs. It is the kind of standard rate equation encountered in semiconductor physics. Here is the system: ...
-1
votes
0answers
56 views

Why is NonlinearModelFit calling the model function with symbolic arguments?

I have a model to fit which is made of numerical functions and so it can give a value for any numerical value of the arguments, but creates an error when called with symbols. ...
13
votes
1answer
271 views

Optimizing a Numerical Laplace Equation Solver

Laplace's Equation is an equation on a scalar in which, given the value of the scalar on the boundaries (the boundary conditions), one can determine the value of the scalar at any point in the region ...
1
vote
1answer
66 views

Plot FindRoot for non-trivial function

I would like to plot the results of FindRoot over certain range of inputs. I tried to do this with the code: ...
3
votes
1answer
75 views

Find point at which equation stops having roots (if it exists)

I am interested in the roots of this function: f[M_, b_] := 1 - (2 M Gamma[2, 0, (1/M + b M)/Sqrt[b]])/(1/M + b M) for fixed values of b. In particular I want ...
1
vote
2answers
127 views

How can I use FindRoot on an expression from NDSolve?

I have a second order ODE that I can only solve numerically using NDSolve, but I then need to use the solution in FindRoot and am running into errors. A simplified but analogous problem is the ...
0
votes
0answers
62 views

FindMaximum inconsistency

The code below seems to work for n<11. But for n=11, and above, it outputs newa then just outputs "beep" sound. WhyTheBeep says "The kernel Local has quit ...
0
votes
1answer
80 views

How to guess initial complex value for FindRoot

I have to solve a transcendental equation for a parameter, say $\beta$. Now, the $\beta$ has a range from $ik$ to $k$ where $i$ is the usual imaginary root $\sqrt{-1}$ and $k$ is a real number. ...
3
votes
1answer
179 views

Tutorial for basic numerical methods for PDEs

I'm afraid this is probably not going to be a "good" question, but I'd like to use Mathematica to learn about basic numerical schemes for solving pdes. For example, I'd like to compute the solution of ...
1
vote
0answers
62 views

Using Root for numerical evaluation [closed]

In my expressions I have a lot of roots to calculate. For example: Root[#1^3 + #1^2 + #1 &, 1] Since most of them cannot be solved analytically, I would like ...
0
votes
0answers
304 views

Jacobi eigenvalue and eigenvectors algorithm

Suppose we have a symmetric matrix with dimensions n x n. I need to find the eigenvalues and eigenvectors of this matrix using the Jacobi method. I wrote this code: ...
0
votes
0answers
84 views

Speeding up numerical computations

So, after seeing this and this post, I was thinking whether there were any general rules for speeding up numerical computations (not only NIntegrate or ...
2
votes
1answer
71 views

Numerical Error with Large Matrices

I am writing a Finite Element Analysis program in Mathematica. The code involves handling a large matrix with large entries. I get an error when I try to use Mathematica's "LinearSolve" to solve a ...
-1
votes
1answer
130 views

Minimization problem using FindMinimum. Functional value “is not a real number”? [closed]

This question is a follow-up of another one I asked a few days ago. I followed the instructions given in the answer provided by the user that responded. I modified that answer to solve another ...
3
votes
2answers
135 views

Computing the minimum distance in a contour plot

I have the following Mathematica code ...
6
votes
2answers
213 views

Numerical partial derivative

For a one-variable numerical function it's simple to calculate the derivative at a point with Derivative as @Szabolcs has pointed out before: ...
3
votes
1answer
99 views

Strange behaviour of PolyLog Function

I discovered some strange behaviour of the PolyLog[] Function in Mathematica which seems to me like a bug in the function implementation. It looks like ...
0
votes
1answer
76 views

What is the correct way to use NIntegrate inside the FindMinimum function?

I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
2
votes
3answers
123 views

How can I name “a[[i]]” the parts of Table “a”? Or how to make Table “a” grow inside FindMinimum?

Let's say I want to minimize a function that uses a Table named a with the Conjugate Gradient Method of ...
14
votes
4answers
273 views

How to remove duplicates from set of machine precision 2D points?

I have a set of 2D points with machine precision coordinates. I need to remove all duplicates. Performance is important. This is the most obvious fast solution: ...
1
vote
1answer
98 views

What do these error messages mean when numerically solving differential equations?

I am using Mathematica to numercially solve the following equations: ...
4
votes
1answer
184 views

NDSolve does not respond

For some sets of constants, NDSolve gives me true solutions, but when I try for example, T = 1/(2*2200), Mathematica does not respond. What can I do? The code below ...
0
votes
1answer
87 views

Alleviating a bottleneck involving a function call with symbolic derivatives

I have a bottleneck problem involving a function call with symbolic derivatives. I don't have much experience with Mathematica (or any dynamic language) and I'm certain that the way I've set this up ...
2
votes
1answer
96 views

Mathematica 7: Problems when evaluating Fourier inside a ParallelTable

after I got such a great response for my first question on this site, I'm very encouraged to asked my second one! So here it is, very generally: To speed up a "row-wise" (i.e. 1D) operation on a ...
6
votes
0answers
70 views

Mathematica 7: “LessEqual::nord:” error when using NMinimize on a real function

I encounter a problem (Mathematica 7) similar to Strategies to avoid LessEqual::nord in NMinimize? but the advised strategies don't work for me. Also, I get different results with different ...
1
vote
1answer
49 views

Can't see updating performed by NMinimize[…,StepMonitor->(…)] outside of Button in which it's called [duplicate]

I've made a peak-fitting GUI in which I have a "Fit" button that, when pressed, calls NMinimize[...,StepMonitor->(step++)] to minimize a sum of squared ...
2
votes
2answers
174 views

Weird NDSolve behavior with Piecewise (MMA9)

NDSolve in Mathematica 9.0.0 (MacOS) is behaving strangely with a piecewise right hand side. The following code (a simplified version of my real problem): ...
1
vote
0answers
73 views

Why is FindRoot initial value far from the specified one?

I am trying to numerically find the root of a function that looks a bit like: 1/x - (SchurDecomposition[A[x]][[2]])[[1]], where ...
1
vote
2answers
283 views
2
votes
0answers
138 views

Minimization in mathematica [closed]

I have recently had a strange problem with NMinimize. I have a very huge function with respect to 20 parameters. When I ...
11
votes
1answer
417 views

2D Heat equation: inconsistent boundary and initial conditions

I'm attempting to use NDSolve on a 2D boundary value problem with initial conditions. Upon running my code, I get the following message: "NDSolve::ibcinc: Warning: Boundary and initial conditions are ...

1 2 3 4