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 ...
0
votes
0answers
15 views

Calculate distance base on value that is vary [migrated]

I am new to Mathematica. I am stuck at getting one specific value after calculating with value that is changing from 0.5 to 1.0 I have value 400 and from that I want to go to destination 720 using ...
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
100 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 ...
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 ...
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
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
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}, ...
2
votes
1answer
109 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 ...
1
vote
1answer
101 views

FindRoot with vector functions

I'm trying to solve a system of non-linear equations with FindRoot, and I get the answer, but also a ...
0
votes
2answers
160 views

find the real root

I have the following equation: \begin{equation} (y-1)^{b1} - C~~ y~~ \exp(a x)=0 \end{equation} where $a, b$ are real constants, $C$ may be a complex number. I need to find the real solution of the ...
0
votes
0answers
46 views

Ideas for NDSolve?

I'm currently trying to find a numerical solution to a differential equation of the form: D[W[X], {X, 4}] ==(-(1/(delta + G - (G X)/L)^2) + 1/(delta + (G X)/L)^2) ...
0
votes
0answers
49 views

FindRoot with units error: Message text not found

This is sort of embarrassing. I'm working on a document to extol the virtues of Mathematica, and I can't get it to solve a relatively simple system of equations involving units. In this code, when I ...
2
votes
2answers
172 views

How to solve this numerically?

May I ask what is the best way to evaluate ...
0
votes
0answers
53 views

FindRoot to find numerical solution of a given index

I want to find solutions of a system of multivariate nonlinear equations of a specific index (i.e., the no. of positive eigenvalues of the Jacobian evaluated at the solution). I know the FindRoot ...
1
vote
2answers
156 views

Mathematica can't minimize a function

Mathematica seems not to be able to minimize this univariate function over integer arguments, $r>2, r \in \mathbb{Z}$. ...
0
votes
1answer
143 views

Trying to solve a transcendental equation involving bessel functions

I've never used Mathematica before and am trying to numerically solve equation (12) from this paper: http://arxiv.org/abs/hep-ph/9907218v2. Ideally I'd be able to find the smallest value of $x_{n\nu}$ ...
3
votes
2answers
164 views

Solve-ing with initially unassigned parameters and Solve-ing using their numerical values produces different results

I am trying to solve an equation using the following piece of code: ...
2
votes
1answer
123 views

Decomposing a diagonal positive real matrix

I would like to 'decompose' a diagonal positive real matrix $E$ of rank $D$ onto $\sum_{i=1}^{D}c(i)N^i$: $$E = \left( \begin{array}{ccc} 0 & & & \\ & a & & \\ ...
1
vote
1answer
134 views

Perform FindRoots on Function Evaluation Containing RootSearch

I am using Ted Ersek's RootSearch function in Mathematica 9.0 (http://library.wolfram.com/infocenter/Demos/4482/) to create a function that I am using for graphing. ...
1
vote
1answer
146 views

Problem to solve an integral equation [closed]

I am new to Mathematica. I am trying to numerically solve for C in the following equation: $\begin{equation} \begin{array}{lcl} -\int_0^\infty (5000000+100000 x+ C)^{-1} ...
1
vote
1answer
141 views

NSolve with numerical function

I would like to solve numerically an equation which involves a numerical function constructed by fitting some data: ...
7
votes
1answer
608 views

What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
1
vote
1answer
95 views

How do I get Nsolve to work with hyperbolic functions?

This is a rather simple numerical solution, but it simply doesn't work. Does anybody have a solution? NSolve[x - Sinh[x] - 1 == 0, x] NSolve::nsmet: This ...
2
votes
1answer
168 views

Numerical errors/inaccuracies in ProductLog

Context In cosmology, a fairly accurate model to describe the gravitational potential, $\psi(r)$ of dark matter halos is given by $\psi( r)=\log(1+r)/r$. ...
2
votes
2answers
143 views

Incorrect numerical derivative of function that uses FindRoot

I am trying to plot the derivative of function g[x] below where g[x] is defined as the root of another equation. However, I am ...
1
vote
3answers
144 views

automatic processing of numerical results in `Plot`

First I want to solve an equation $F(x,y)=0$ for $y$ by supplying a value of $x$. (suppose obtaining the analytic form of $y(x)$ is too difficult) Then I want to plot root $y$ (numerically calculated) ...
1
vote
1answer
105 views

Passing f[x][[1]] to FindRoot [duplicate]

FindRoot seems to fail for most examples of the form f[x_?NumericQ] := {x - 3 , x^3}; FindRoot[f[x][[1]], {x, 3}] ...
1
vote
3answers
309 views

Can plot a function, NSolve takes too long

I'm new to Mathematica, so maybe mine is an easy to solve issue, but I haven't been able to figure it out. I have a series of linear ODEs I solve using for: ...
3
votes
3answers
544 views

Implementing Newton's method

I have this question on coding Newton's method in Mathematica. I have some code to go by but I have no clue if it's computing the functions in the right order. The book is the numerical methods ...
7
votes
2answers
418 views

Is there any fast way to solve a quadratic matrix equation in Mathematica approximately?

Let the square nonsingular matrix $M$ is a given convergent matrix. What are the best scalar values for $\alpha$ and $\beta$ (in the real numbers domain), at which the following quadratic matrix ...
1
vote
1answer
162 views

FindRoot equation-variable mismatch

I cannot figure out why FindRoot doesn't work and returns this error: The number of equations does not match the number of variables in ... My problem: drawing ...
1
vote
1answer
130 views

FindMinimum gives wrong solutions inside a loop

I have a density function $\rho(r,z)$ and I want to calculate the minimum distance $d_{min} = \sqrt{r^2 + z^2}$ from the center (0,0) in which $\rho$ becomes negative. The easiest way is to find where ...
4
votes
2answers
427 views

Why doesn't FindRoot work correctly?

I'm trying to find the roots of the following equation: I need to find λs for different values of ξ. I know that for all ...
3
votes
2answers
273 views
3
votes
0answers
390 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 ...
3
votes
1answer
114 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
1answer
321 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
2answers
239 views

Computing the minimum distance in a contour plot

I have the following Mathematica code ...
3
votes
1answer
1k 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 ...
2
votes
0answers
144 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 ...
2
votes
1answer
762 views

How to solve equations self-consistently

I want to solve the following equation self-consistently. So, H.u = e.u {{1, d}, {d, 1}}.{u1, u2} = e.{u1, u2} I guess an initial value for ...
4
votes
2answers
421 views

Finding all/most roots of a discontinuous function more consistently?

I have the equation: f[x_]:=α Tan[α*a] - Sqrt[c - α^2] and ideally I want to find all of its positive zeros, given a and c, with variable alpha. The problem is ...
2
votes
1answer
2k views

Forcing FindRoot to return only real solutions

FindRoot documentation reports that if the equation and the initial point are reals, the solutions are searched in the real domain. However, in the following case I ...
4
votes
1answer
208 views

How to solve this trigonometric system of equations numerically?

How can the following trigonometric system of equations be solved numerically? ...
2
votes
0answers
381 views

Numerically/Analytically Solving a System of Equations

I have $6$ functions $f_i(x,y,z)$, $(i = 1, \ldots, 6)$ in three variables $x,y,z$, and I would like to find a simultaneous instance of these variables, say $(x_0, y_0, z_0)$, such that $f_i(x_0, y_0, ...
3
votes
3answers
650 views

How can I solve Tan[t] - t == F[x] for t as a function of x?

How can I solve the equation Tan[t] - t = Ax, where A is a constant for t[x]? I know that ...
1
vote
1answer
194 views
0
votes
1answer
143 views

Industrial Level Applications. Recipe for mixed notation of equations set

I am working with large (linear) equations set within Mathematica in numerical notation. For example, set from 4056 eq. is solved for a second, no more. There is no doubt, result is great. But even ...
1
vote
2answers
1k views

Tricks for solving (lots of) coupled nonlinear equations numerically?

I have a system of 6 non-linear (quadratic) coupled equations with 6 complex unknowns \begin{align*} |x_1|^2 + |x_2|^2 + |x_3|^2 &= a\\ x_1 x_4^* + x_3 x_5^* &= b + c i\\ x_1 ...