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

learn more… | top users | synonyms (1)

0
votes
0answers
28 views

Help needed for solving nonlinear ODEs [on hold]

I want to solve fourth order nonlinear ODE with known boundary conditions using Predictor Corrector methods, or shooting methods in Mathematica but don't know how to solve them with these techniques. ...
1
vote
3answers
73 views

How can I use the command `Minimize` of this trigonometric function? [duplicate]

I want to find the minimum of the function $\sin^6 x + \cos^6 x$. I tried Minimize[{Sin[x]^6 + Cos[x]^6, 0 <= x <= 2 Pi}, x] I got {Cos[2 ArcTan[1 - ...
2
votes
1answer
30 views

How shortening argument test when declaring functions?

When defining some functions which depend in many arguments sometimes we need to include question Q constraints to diminish processing time. My question is simple, there is a way to shorten a long ...
8
votes
2answers
240 views

Water Hammer - Numerically solving system of PDEs

I'm trying to use Mathematica to solve the water hammer effect. ...
1
vote
2answers
102 views

Increasing number of decimal places with FixedPoint

I've tried: In[169]:= newton3[x_] := N[1/2 (x + 3/x)]; FixedPointList[newton3, 1.0] Out[170]= {1., 2., 1.75, 1.73214, 1.73205, 1.73205, 1.73205} Of course: ...
-4
votes
0answers
31 views

Picard iteration method by yn(t) [on hold]

I am really bad with Mathematica, but I have an assignment due in my Real Analysis class that requires it. Here is the question: Denote successive approximations via the Picard iteration method ...
0
votes
2answers
58 views

Iteration of NDSolve

I have a problem with iteration of the result of NDSolve. Namely, the following code works fine ...
4
votes
1answer
90 views

Changing the definition of N: unexpected $RecursionLimit::reclim error

I have some objects represented as follows: Object[data, param] data is a list of numbers, ...
0
votes
1answer
34 views

DSolve for first order nonlinear equation is solution numerical or analytical?

Hi I'm new to mathematica so I may have a somewhat trivial question. my code below solves and plots the results of a first order nonlinear ODE. The solutions mathematica gives me contains & and #1 ...
2
votes
1answer
50 views

Breaking out of NDSolve

I am solving a coupled set of differential equations with NDSolve for 6 unknown functions of time. At a certain point in time, the system hits a singular point where the potential governing the ...
2
votes
0answers
108 views

Volterra integral equation

I have to find an approximate numerical solution for the equation $$ F(x) - \lambda \int\limits_1^{x} \text{d}s \;s^2 F(s) Z(x-s) = G(x) $$ $$Z(s) = (\psi''(1-2\ h\ i\ s)- 0.5 \psi''(1-2\ h\ i\ s))$$ ...
0
votes
0answers
21 views

Why numerical functions can't digest InterpolatingFunction with units?

Answering this question gave me the idea that I must be missing something.. In brief, numerical functions generally 'understand' units: ...
0
votes
0answers
39 views

plotting the stable and unstable manifolds of a difference equation

I have a 2D non-linear system of difference equations for variables x and y defined as follows: ...
0
votes
2answers
155 views

Help Please : Error in plotting the solutions of FindRoot

I want to find the roots of an equation using FindRoot as a function of a real parameter K and then plot the real and imaginary solutions vs. the parameter K. The function I'm trying to find the ...
0
votes
1answer
73 views

Fitting data with inclusion of constraints

How do I find a fit for the dataS (see below) with the constraint that the parameter np is an integer, and that the parameters la+lc = 100. A weak attempt at this is provided below for a specific ...
3
votes
2answers
89 views

NMinimize/NMaximize is unable to generate initial points

Mathematica 10 generates a warning that it is unable to generate initial points for numerical optimization problems. I picked a particularly simple example. The problem goes away when ...
1
vote
0answers
27 views

Apparent issue with derivative of FractionalPart

This issue came to my attention from Math.SE: http://math.stackexchange.com/questions/1015325/is-the-derivative-of-x-on-0-1-always-equal-to-1/1015342#1015342 To summarize, it appears that ...
2
votes
2answers
77 views

How to prevent Round with hided fractions

I found a strange behavior in Round. If we try: ToString[Round[4.811, 0.01], InputForm] we get: 4.8100000000000005 When I expected 4.81 In order to ...
-1
votes
3answers
195 views

Challenge — Defining an ORIGINAL second derivative function?

UPDATE: I do not want to use the Derivative or D functions. – I began with this definition of the derivative , which resulted in: Limit[ #, h -> 0] & /@ { (f[x + h, y] - f[x, y])/ h. But, I ...
1
vote
0answers
49 views

Symbolic and numeric calculations (and plots) simultanuosly

I use Mathematica to do a bunch of symbolic calculations (integrals, ...). This is good because I found that sometimes, if I plug in numeric values, Mathematica takes much longer. However, sometimes ...
2
votes
0answers
61 views

How can I use 'NIntegrate' to show the error?

I have to compute a very complicated integral, which is a 16-dimension one, so NIntegrate use Monte-Carlo. I have set Method -> "AdaptiveMonteCarlo, when I run ...
0
votes
1answer
51 views

Multidimensional NIntegrate problem of the function decaying as 1/x^2

The function I am trying to integrate is more complicated but I can simply write the function as (I had made a typo error, sorry. The '+' sign in front of the r should be '-'): $f(\omega ) = \int ...
1
vote
1answer
86 views

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

Element[Abs[Infinity], Complexes] returns False, that's right. But ...
0
votes
0answers
47 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 ...
1
vote
1answer
54 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 ...
0
votes
3answers
66 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 ...
3
votes
1answer
61 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 ...
1
vote
0answers
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 ...
0
votes
0answers
108 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
80 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
4
votes
4answers
132 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
39 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
156 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
46 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
93 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
112 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
63 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
66 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
150 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
36 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
160 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
157 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
172 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
106 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
53 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
219 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
111 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 ...