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

learn more… | top users | synonyms (4)

1
vote
2answers
310 views

solving for one solution to a system of polynomials

I'm trying to solve a system of equations: ...
6
votes
3answers
961 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 ...
7
votes
4answers
382 views

Defining a Unique Domain for Solving Diophantine Equations

I am working on a research problem in discrete geometry to do with sphere packings, and believe it or not, I have been able to reduce it to finding the solutions to the Diophantine equation, $$n = ...
7
votes
2answers
192 views

Why does Solve and Sum give different answers when according to Table it is the same sequence?

I have been thinking about a piece of code today, but I don't understand why I get different outputs from two in my mind similar Mathematical sums. First I observe that the Table command for this: ...
7
votes
2answers
2k views

Inverse of a complicated function

Mathematica is struggling to find the inverse of this function f(r): ...
5
votes
4answers
374 views

Manipulating Equations

I would like to be able to manipulate algebraic equations. For example, let's say I enter 3x+5==2 I would next like to be able to manually subtract $2$ from both ...
6
votes
1answer
543 views

How to Simplify equations over a Ring with Mathematica?

For example, when we work over a ring, the equation x^3=0 does not imply x^2=0 or x=0, but ...
7
votes
0answers
175 views

What Method options does FindInstance accept?

While answering Trouble getting FindInstance to return multiple results for certain constraints it became clear that for this problem FindInstance would be better ...
8
votes
2answers
262 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: ...
8
votes
3answers
981 views

Checking if the roots of a function are real

I'm trying to determine if the roots of a function are real. How would you do that? (In particular I'm interested in verifying that the roots of LegendreP[6, x] ...
12
votes
1answer
655 views

Proving inequalities with Mathematica

Question summary: I would like to learn some tips and tricks on how to prove inequalities with Mathematica. I'm studying various inequalities in triangle that have the form $R+ar + bs\geq 0$, where ...
14
votes
3answers
7k views

Assign the results from a Solve to variable(s)

I understand Mathematica can't assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?
11
votes
2answers
572 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 ...
4
votes
1answer
3k views

Why can't Mathematica “Solve” my equation?

I am trying to get Mathematica to solve the following equality in terms of $w_i$ $\displaystyle \frac{\sum_{i = 1}^{n} x_i }{\sum_{i = 1}^{n} y_i} = \frac{\sum_{i = 1}^{n} ( (\frac{x_i}{y_i}) w_i ) ...
7
votes
3answers
2k views

How to solve an overdetermined system in Mathematica

I would like to understand the reasons and find a way to avoid such behaviour of the Solve function in Mathematica 8. ...
0
votes
2answers
193 views

Constraining two points, a specified distance apart, to a line

Suppose that I have two points in the xy plane: pt1 and pt2init. pt1 is fixed in space, ...
2
votes
1answer
400 views

Inconsistent initial and boundary conditions

I have a 4th order nonlinear PDE with the following BCs and IC: ...
3
votes
3answers
380 views

Animate a position change along the curve for every iteration

I've only had few previous experiences on Mathematica before. So basically an entry-level question that harasses a rookie like me. I made the following attempt using bisection method to calculate ...
4
votes
3answers
718 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]] ...
6
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: ...
2
votes
1answer
346 views

Reduce/Solve an equation with symbols in powers

I am trying to solve the following equation with respect to x. eqn = x^z + y == a; But when I do ...
2
votes
2answers
233 views

How to find solutions that yield of root of unity?

I have a polynomial with coefficients that are integer polynomials in another (complex) variable. For example: 1 + (1 - v^2) #1 + (-3 - v^2) #1^2 + #1^3 & I ...
3
votes
2answers
526 views

Solving a linear equation in Mathematica

This should be easy but I can't seem to find the right way to do it. I have an equation of the form $a x + b x + c y + a z + d z = 0$, and I'd like to solve for relations between the parameters ...
5
votes
2answers
2k views

Select Solution with real (positive, etc) coefficients - ignoring variables

I often need to solve equations for numerical coefficients while preserving numerous variables (e.g. to preserve scaling relations). Thus I end up with a set of solutions like $$ ...
0
votes
1answer
119 views

Numerical rule evaluation -> {True, False} to deviation of target equation

I solve some equations numerically with FindRoot[] returning a quadruple {1,2,3,4}. Because the solver sometimes do not find any roots depending on parameterization of these equations I select only ...
5
votes
2answers
1k views

Error (NSolve::ifun) when using NSolve, I need help interpreting the error

I wrote the following code to observe how the solutions to the equation $(e^{i a})^2 = e^{i b}$ varied as $b$ varied between 0 and $2\pi$ ...
15
votes
6answers
4k views

About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
2
votes
3answers
735 views

Finding roots of nontrivial equation

I am trying to solve the following nontrivial equation: ...
2
votes
2answers
113 views

Solving an equation and finding a couple of results given that they are integer

My problem is to find all solutions to an equation with 2 variables between two values that define the range of my search. e.g., $(x+y-y²)/(1-y-x²)=0$ with solutions ${x,y} \in \mathbb{Z}$.
7
votes
1answer
729 views

How to find the smallest root

I have a continuous, differentiable, monotonic, bounded function called F[t]. If t -> Infinity then ...
4
votes
4answers
2k views

Solving complex equations

I feel like I am missing a basic, but key point when using Mathematica's Solve or Reduce. ...
1
vote
3answers
788 views

Conditional expression

How do I evaluate a conditional expression in order to convert the solutions that are in terms of $x$ to a new variable $c$ depending on $x$? The conventional method I have been using with eliminate ...
5
votes
1answer
468 views

Solving recurrence relation using Mathematica defined in a piecewise way

I have a recurrence relation defined as following: RSolve[ { p[0] == p0, p[1] == λ p[0]/μ, p[i + 1] == λ p[i]/(2 μ) }, p[i], i ] Note that the relation ...
16
votes
2answers
3k views

Can Reduce *really* not solve for x here?

Sometimes I get the feeling I'm just flailing blindly with Mathematica. Is solving for $x$ in the equation $$ \frac{\cosh (x/2)}{x} = \sqrt{2} $$ really beyond the scope of Mathematica? I try to ...
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
77 views

Trouble using FindInstance with MatrixRank

I'm really confused about what's going wrong with my call to FindInstance: ...
16
votes
2answers
782 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
2answers
638 views

Number of iterations in NSolve

In Excel's solver, one can define how many iterations are to be done, to one's liking. I am wondering if this is possible to do with NSolve in Mathematica? Code ...
4
votes
2answers
783 views

Solving inequalities for positive Integers

Consider the following; ...
10
votes
1answer
590 views

Find roots of polynomial in field extension $GF(2^n)$?

How can I find roots of polynomial in extension field $GF(2^n)$?
9
votes
1answer
374 views

Mathematica implementation of Earth Movers Distance?

Has anyone implemented in Mathematica the Earth Mover's Distance (EMD)? A concept dating back to Monge 1871, used to compare histograms and images, e.g., the CIEDE2000 Color Difference algorithm. ...
4
votes
4answers
794 views

recursively solve equation and saving the values

I am new to Mathematica. I am trying to recursively solve an equation and saving the values into a Table. Since I need the real solutions only I use ...
10
votes
3answers
314 views

FindInstance with a Diophantine equation seems to go on forever

I tried to find a non-trivial integer solution to the equation $$2012^2=a^2+b^2+c^2+d^2+e^2$$ with Mathematica but the computation takes minutes; I might be doing something wrong. ...
12
votes
1answer
172 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 ...
8
votes
1answer
2k views

Solve Lagrange multipliers optimization problem

I have two nested solid figure, where $V(a,h,\tau)$ defines the volume and $A(a,h,t)$ defines the surface. The outer solid figure is parametrized in $a_s$,$h_s$ and $t_s$ (they share a common center). ...
7
votes
1answer
728 views

Handling failed FindRoot calls

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

Backsubstituting solution into FindRoot

I am trying to solve a system of equations which is dependent to an parameter alpha. So I iterate over alpha via a ...
4
votes
2answers
931 views

How to find regions that satisfy this inequality?

I am new to Mathematica and would like to find the set $$\{ (x,y) \in \mathbb{R}^2: (3x+y\exp(xy))(x-a) + (6y + x \exp(xy))(y-b) < 0 \}$$ for some constants $a$ and $b$. How can I do ...
5
votes
2answers
337 views

Equation solving with GroebnerBasis

I have a system of quadratic equations defined below ...
2
votes
1answer
1k views

Solve in terms of specific variables

As part of my physics homework (which I do not need the answer for, as I did it by hand, and got the correct $$\frac{m_1 g-m_2 g \sin(\theta)}{-m_1-m_2}$$ as the answer) I would have liked to have ...