Questions on the analytic and numeric equation solving functions of Mathematica (Solve, Reduce, NSolve, FindRoot, DSolve, RSolve, etc.).

learn more… | top users | synonyms (4)

7
votes
1answer
715 views

Handling failed FindRoot calls

I want to handle FindRoot calls which did not converge (e.g "thrown" error message FindRoot::cvmit) ...
4
votes
2answers
456 views

All possible solutions to the Matrix Equation (free variables appearing)

I am attempting to solve a system of linear equations using LinearSolve[] . In my case, the number of unknowns are more than constraints. I learnt that LinearSolve ...
3
votes
2answers
649 views

How can I solve an equation with symbolic coefficients?

I want to try to solve the following a x^(17/6) - b x^2 - 1 == 0 where a and b are ...
3
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 ...
15
votes
1answer
333 views

Strange behaviour of Reduce for Mod[x,1]

For every integer $x$ the equation Mod[x, 1] == 0 holds. While Simplify[Mod[x, 1] == 0, Element[x,Integers]] gives ...
12
votes
2answers
354 views

Is there a way to use functions like Prime[n] within Solve[]?

I'm trying to see if a number can be written as the sum of two prime numbers. Ideally, I would like to use Solve[ Prime[n] + Prime[m] == 100, {n, m}] But that ...
11
votes
1answer
194 views

ToNumberField won't recognize Root as an explicit algebraic number

In Mathematica 9.0.1, it appears that ToNumberField will not always recognize a Root object as an explicit algebraic number. ...
8
votes
4answers
579 views

Finding the roots of Hypergeometric1F1[]

I am trying to find the roots, λ, for this equation: Hypergeometric1F1[1/4 (2 -  λ /β), n + 1, β] for certain ...
5
votes
5answers
4k views

How to get rid of warnings when using Solve on an equation with inexact coefficients?

When I solve this equation in Mathematica 8, I can get the right answer, but with some uncomfortable warnings. Equation: ...
4
votes
1answer
460 views

How do I use RSolve to solve a system of recurrence relations?

I am trying to solve a system of recurrence relations as follows. ...
3
votes
1answer
523 views

Solving Simultaneous Equations

I am trying to solve two equations that take the form: $W_0 \sqrt{1+\left(\dfrac{z}{\lambda\,\pi\, W_{0}^2}\right)}=W_1\;\,\quad \ldots(1)$ $W_0\sqrt{1+\left( \dfrac{z+0.1}{\lambda\, \pi\, ...
3
votes
2answers
3k views

How to convert a system of parametric equations to a normal equation?

For example, I have a system of parametric equations (R is a constant number) : ...
1
vote
1answer
210 views

How do I get all possible solutions in an underdetermined system? [duplicate]

I have two problems which I'd like to solve with Mathematica. If I have a system of two equations with three unknowns, how can I get to list all possible solutions for the unknowns? Here is what I ...
1
vote
1answer
413 views

Using previous two solutions as a start point in FindRoot

I need to solve a sequence of equations and I want the starting point of each new FindRoot to be the solution of the earlier FindRoot, increased or decreased by a a bit in the following way: Some ...
16
votes
1answer
661 views

Bug in Solve (Mathematica 9)

Just came across the strangest bug under both Mathematica 9.0.0 and 9.0.1. If one enters: Solve[m == p Sin[x] && -Pi/2 < x < Pi/2, x] ... then ...
8
votes
2answers
759 views

Find the parameter values satisfying conditions for all roots of an equation

Hi I'm very new at Mathematica. My real problems concerns a much more difficult equation with many parameters, but I want to check that the method is good, so I made up a test equation. My test ...
5
votes
2answers
267 views

Intersection of two splines

I have a collection of sets of points, each set defining the segment of a (nice) curve on the unit sphere $S^2 \subset \mathbb{R}^3$. The points are computed numerically. I now want to compute the ...
4
votes
3answers
198 views

Why the inequality does not take into account the domain?

I have this inequality: Reduce[(4000-1000k)/(k-4) < 0] and the answer is k ∈ Reals I would expect ...
4
votes
1answer
323 views

Eliminating functions from system of PDE in Mathematica

Mathematica users, Let's see an example of three PDEs: How can I eliminate variables q1[x,y,z] and q2[x,y,z] from a system of ...
3
votes
1answer
532 views

Finding intersection of two graphs

Here is a toy problem: I have a (directional) line that starts from {2,0} and goes through {1.8, 0.01}. Also I have a ...
3
votes
3answers
581 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 ...
2
votes
1answer
347 views

Solution given by Wolfram Alpha but not _Mathematica_

Why will Mathematica not give a soluion to Solve[Log[x] == Log[j, Log[j, x]], j], but Wolfram Alpha will?
2
votes
1answer
740 views

NDSolve two PDE plus one ODE, together

I have a couple of PDE (time and space/length) that are correctly managed by NDSolve, but to which I’m adding an ODE on which the acc “accumulates”, through time, a ...
2
votes
1answer
1k views

Solve matrix equation A*X=X*B using LeastSquares

I want to solve matrix equation A*X=X*B using LeastSquares method, but it is suited for equation like A*X=B. All matrices are 3x3 ...
1
vote
2answers
128 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}$. ...
1
vote
1answer
203 views

General form of a linear transformation

Let $v_1 = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $v_2=\begin{bmatrix} 1 \\ -1 \end{bmatrix}$ and let $A= \begin{bmatrix} 3 & 2 \\ -2 & 1 \end{bmatrix}$ be a matrix for $T\colon \Bbb ...
1
vote
2answers
306 views

solving for one solution to a system of polynomials

I'm trying to solve a system of equations: ...
0
votes
0answers
29 views

How to solve 7 equations with different vars?

a = 0.35; b = 0.4; Delta = 0.1; Q1 = 0.65; Q2= 0.15; Phi= 0.5; Tau =0.28; Rho= 0.01; Mu= 3.7; R = 0.047; A= 0.4; B= 1.99; Sigma = 1.1; e1 := (1 - a) *p*A*K*L^(-a) = (1 - b) B(1-K)*(1 - ...
0
votes
1answer
105 views

How to solve this nonlinear 2 by 2 equations?

I have a equation (x^2 + q1^2 - y^2)/2*(x + q1 - y) + (1 - 2*a)*q + 2*F = 2*(1 - a)*c[q] in q(variable) with parameters q1,a,F and function c(in variable q also, and I define it outside Solve so I can ...
16
votes
5answers
684 views

Fitting points to tilted, off-center ellipse

I have 24 x-y points that are supposed to form an ellipse. ...
9
votes
2answers
2k views

FindRoot Domain restriction

I am solving a system of four non-linear equations in four variables using FindRoot. I have some sense of the relationship between the variables so I don't want Mathematica to do its computations in ...
17
votes
1answer
928 views

The Orbit and Perigee of the Flamsteed comet

Historical context This year we have the 330-th anniversary of the Battle of Vienna - one of the great formative events of European history, it took place on September 12, 1683. Kara Mustafa, Grand ...
12
votes
3answers
507 views

How can I simulate this toggle mechanism?

I've been introduced to Mathematica very recently. Basically, I haven't actually "solved" anything in my Mathematica lifetime, but I've done some simulations. With my fractional knowledge, I tried ...
7
votes
3answers
358 views

1D quasicrystal: points on a line nearest to points on a lattice

I have a simple lattice / line manipulation: ...
16
votes
2answers
772 views

Using the Krylov method for Solve: Speeding up a SparseArray calculation

I'm trying to implement this Total Variation Regularized Numerical Differentiation (TVDiff) code in MMA (which I found through this SO answer): essentially I want to differentiate noisy data. The full ...
8
votes
1answer
193 views

Unexpected behaviour of Solve applied to two equations in two variables

I have a simple Mathematica expression Solve[{a(a-1)Sqrt[1+a^2+b^2] == b(a^3-1), b(b-1)Sqrt[1+a^2+b^2] == a(b^3-1)}] which returns (on version 8.0, and also ...
7
votes
1answer
394 views

Issue with the NDSolve code

With this procedure, one may determine an eigen-value function $R(a)$ for any given $\Xi$ (say 0, 25, 50, 75, 100) ...
6
votes
3answers
939 views

Why won't Mathematica Solve a set of two equations for one variable?

For example, if I try to Solve this set of equations Solve[y == 3 x + 5 && y == -x + 7, {x, y}] Mathematica gives the right values for ...
6
votes
2answers
1k views

How to invert an integral equation

There have been numerous times when I've needed to invert an integral equation, i.e. I have something like $$f(x) = g_1(x)\int_{0}^x g_2(x') dx'$$ for arbitrary functions $g_1$ and $g_2$, and ...
4
votes
1answer
403 views

How to solve this equation with integers as a solution?

I want to solve the equation $$x^y + y = y^x + x$$ with $x$, $y$ are integer numbers. I tried Solve[x^y + y == y^x + x, {x, y}, Integers] How to solve the ...
4
votes
3answers
376 views

How to obtain a fixed number of solutions to $x+y=1$?

How to obtain a fixed number of solutions to $x+y=1$? For example, I want 4 solutions: $(1,0),(2,-1),(3,-2),(-2,3)$ I want to do this also on bigger equations such as $x+y+...=1$ and then I want to ...
13
votes
2answers
775 views

Suppressing negative roots in Mathematica

Problem Using Mathematica's Solve operator can sometimes lead to an output involving a positive and negative root (say when solving for a variable such as ...
12
votes
1answer
171 views

Solve[ ] with Method -> Reduce gives a different result than Reduce[ ]

Why does Solve[Sqrt[x + Sqrt[x]] - Sqrt[x - Sqrt[x]] == m Sqrt[x/(x + Sqrt[x])], x, Reals, Method -> Reduce] give a different result than ...
11
votes
2answers
568 views

Google Code Jam: Mountain View code review

After participating in Google Code Jam 2012 Round 2, it occurred to me that the Mountain View problem boiled down to solving a set of linear inequalities, which could be done in Mathematica. I've only ...
8
votes
2answers
254 views

Trouble getting FindInstance to return multiple results for certain constraints

I'm having a hard time getting FindInstance to return multiple results. Consider this simple example: ...
6
votes
1answer
467 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 ...
4
votes
4answers
296 views

An easier way to find the properties of an ellipse from its equation?

In this Q&A about fitting an ellipse to a set of points, there are multiple answers that generated general equations of the ellipse, like this one by @ubpdqn: However, the steps to find out the ...
4
votes
3answers
699 views

Replace function and its derivatives found with Solve

If I have an equation eq = f[x] + g[x] == 0 and I solve for f[x] sol = Solve[eq,f[x]] ...
3
votes
3answers
177 views

What is the formula for this numerical series?

I'm developing a questions game. My goal is that the score for each correct answer will increase as the user answers more questions. Initially there are 15 points for each correct answer. Every 4 ...
11
votes
1answer
220 views

FindInstance returns Indeterminate in version 9, but not in 8

Here is a trivial system of equations in three unknowns for which FindInstance obtains a solution: ...