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

learn more… | top users | synonyms (4)

9
votes
3answers
698 views

Using FindInstance to Prove No Solutions Exist

For a small amount of background, I am currently working on an undergraduate research project in Combinatorial Geometry and I'm working on a case analysis for embedding spherical simplicial ...
9
votes
1answer
239 views

$1 - \sqrt{5}$ $\in$ $\mathbf{R}$?

Why is there a difference in the output of the following codes? First: ...
9
votes
2answers
1k views

RootSearch for complex or multiple equations

First the background. I'm trying to solve for the roots of a rather messy complex equation. This is not the exact equation, but it's a decent (simpler) stand in: ...
9
votes
1answer
266 views

Efficient way to solve equal sums $x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k$ with Mathematica?

I need to solve the system of equations, call it $S_1$, in the integers $$x_1x_2x_3x_4x_5 = y_1y_2y_3y_4y_5$$ $$x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k,\;\; k= 2,4,6$$ I used a very ...
9
votes
1answer
398 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. ...
8
votes
3answers
2k views

First positive root

Simple question but problem with NSolve. I need help how to extract first positive root? For example: ...
8
votes
2answers
533 views

How do I solve this equation?

I want to solve the equation $$ f(f(-1)) = \sqrt{2} + g(f(2)), $$ where $$f(x) = \dfrac{a}{x^2} - 3x + 2, \quad g(x) = a\cdot \sin 2x$$ $a$ is unknown. The solution is $a \approx{-5.81}$. I tried ...
8
votes
2answers
701 views

How to solve a system of equations of the Vietnamese Mathematical Olympiad?

This is a system of equations of the Vietnamese Mathematical Olympiad 2013, the first day. Solve the system of equations $$\begin{cases} \sqrt{\sin^2 x + \dfrac{1}{\sin^2 x}} + \sqrt{\cos^2 y + ...
8
votes
3answers
426 views

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

I have a simple lattice / line manipulation: ...
8
votes
3answers
1k 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] ...
8
votes
3answers
534 views

How do I make Reduce yield all solutions explicitly?

Say I want to do the following: Reduce[ x+y+z==1, {x,y,z}, Modulus -> 7 ] then I get a solution with parameters, C[1] : ...
8
votes
2answers
266 views

How can I only draw outer common tangent to two circles?

I have code worked for drawing common tangent lines to two circles(http://en.wikipedia.org/wiki/Tangent_lines_to_circles), now I want to delete the inner common tangent lines, how? ...
8
votes
2answers
388 views

Finding all points of period n in an iterated map

I'm trying to implement an algorithm of Jenkinson and Pollicott to calculate the Hausdorff dimension of a Julia set for the map $f_c : z\mapsto z^2 + c$. It's described on page 40 of their paper, ...
8
votes
4answers
195 views

Combining solutions while solving

Here is a simple representation of my problem. I want to solve Solve[(w^2*c^2 /. #) - 1 == 0, w]& /@ {{c -> 1}, {c -> 2}} ...
8
votes
2answers
168 views

How to correct this, `f[a_] := FindRoot[eq == 0, {x, 0.5}]`, where `eq` contains a parameter $a$, without using `eq[a]`?

I want to solve an equation with a parameter $a$, and define the result as a function of $a$. It is something like this: ...
8
votes
2answers
823 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 ...
8
votes
3answers
261 views

Is there a relatively quick way to solve my integer-valued equation?

This is a very simple problem. It can be solved by nested Forloops that exhaustively test every possible case, throwing out all non-solutions. Find all the ...
8
votes
2answers
3k views

Inverse of a complicated function

Mathematica is struggling to find the inverse of this function f(r): ...
8
votes
2answers
694 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 ...
8
votes
2answers
925 views

How to find the maximum value of an integer that satisfies some inequality

Consider the following Mathematica expression: Reduce[2^j/(j + 1) <= 10, j, Integers] which outputs: ...
8
votes
2answers
304 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
674 views

Can Mathematica solve this sort of functional/differential equation?

I am looking for differentiable functions $f$ from the unit interval to itself that satisfy the following equation $\forall\:p \in \left( 0,1 \right)$: $$1-p-f(f(p))-f(p)f'(f(p))=0$$ Is there a way ...
8
votes
1answer
406 views

Complex valued 2+1D nonlinear PDE using NDSolve

I am trying to follow the main ideas presented in this question, applying it to my own problem, which is a complex, time-dependent, nonlinear PDE: $$i \frac{\partial \psi}{\partial t} = \left[ ...
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). ...
8
votes
1answer
196 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
3answers
1k views

Finding the number of solutions to a diophantine equation

I want to count total number of the natural solutions (different from 0) of the equation $2x + 3y + z = 100$, but don't know how. How can I calculate it using Mathematica? I tried: ...
7
votes
4answers
442 views

Solving $L=\frac{3}{2} \sqrt{4 \pi ^2 A^2+W^2}-\frac{\sqrt{5 W \sqrt{4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt{2}}+\frac{3 W}{2}$ for $W$

When I solve the aforementioned equation for $W$ or $A$ on Mathematica I get a long and ugly equation in return, namely one of the solutions for $W$ is: (attempt to read at your own health) ...
7
votes
4answers
428 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
3answers
445 views

Efficient code for solve this equation

We have $a*b*c=-1$, $\frac{a^2}{c}+\frac{b}{c^2}=1$, $a^2 b+a c^2+b^2 c=t$ What's the value of $a^5 c+a b^5+b c^5$? I tried ...
7
votes
5answers
328 views

Why is FindInstance finding non-instances?

Consider this example: FindInstance[Exists[{x, y}, x > 1 && y > 1 && x > Sqrt[x + y]], {x, y}] which finds values of $x$ and $y$ such ...
7
votes
1answer
690 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 ...
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. ...
7
votes
2answers
1k views

NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
7
votes
1answer
803 views

Handling failed FindRoot calls

I want to handle FindRoot calls which did not converge (e.g "thrown" error message FindRoot::cvmit) ...
7
votes
1answer
255 views

How to substitute the following conditions into an expression?

I have an expression: $p=a\;b\; x + b^2\; y + a\;c\; z$. I want to substitute $a\;b=1$, $b^2 = 2$ and $a\;c = 4$ to obtain $p = x + 2y + 4z$. How can I tell Mathematica to do that? I dont know how to ...
7
votes
2answers
253 views

Using NSolve in the complex plane

I am trying to find numerical values for $\Im\ e^{\frac{1}{2} +i\ y} = \Im\ \zeta(\frac{1}{2} +i\ y)$ for a given range. I have tried: ...
7
votes
2answers
434 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 ...
7
votes
1answer
829 views

How to find the smallest root

I have a continuous, differentiable, monotonic, bounded function called F[t]. If t -> Infinity then ...
7
votes
2answers
194 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
3answers
490 views

NDSolve and {C, K, Slot} and other built-ins as a variable name

The following problem is an exploration of what causes the error "Input is not an ordinary differential equation" in Mathematica as it seems to have changed from version 8 to version 9. Specifically ...
7
votes
1answer
640 views

Getting an InterpolatingFunction from a ContourPlot

I have a function, say minimizeme[Ω_][β_][ϵ_] = ϵ^2 Ω - Log[2 (Cosh[2 β] + Cosh[2 β ϵ])]/(2 β); I want to find its critical points in $\epsilon$ for a given ...
7
votes
1answer
252 views

Why does Mathematica not give simple solutions to simple system of equations with powers

I trt to get Mathematica getting me the simple solutions for x and y from this system of two power equations: $$\text{Eq. 1: } z=x^{m}y^{n}$$ $$\text{Eq. 2: }z=\tau x^{m-1}y^{1-n},$$ The simple ...
7
votes
2answers
198 views

Behavior of Reduce with variables as domain

When using Reduce, I accidentally put a set of variables as the domain. To my surprise, it not only seems that Reduce expects ...
7
votes
1answer
200 views

How to plot inequalities taking into account that points must be integers and not reals?

I have solved with Mathematica 9 the following integer inequalities using Reduce: ...
7
votes
1answer
411 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) ...
7
votes
1answer
644 views

Using Mathematica to help to determine the consistency of and numerically solve systems of non-linear equations

The formal problem The question I am about to ask is applicable to many scientific and engineering problems. In short, I am bout to ask for pointers and practical advice for Mathematica beginners who ...
7
votes
1answer
179 views

How to find the positive region of this function?

I'm new-ish to Mathematica and I'm using it to learn the basics of derivative trading (for fun not for trading!). I've defined a simple function to calculate the pay off of a trading on a call. I have ...
7
votes
1answer
144 views

Recurrences of lists

Assume we have a multi-dimensional recurrence, e.g. $\qquad\begin{align*} a_1 &= (1,2) \\ a_n &= (1,2) + a_{n-1} \quad, n>1 \end{align*}$ with the easy solution $a_n = (n,2n)$. How ...
7
votes
0answers
437 views

Creating and using an explicit piecewise function in a convenient way

I have a set of data points that define a function in the form curvePts = {data1,data2,...} where ...
7
votes
0answers
184 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 ...