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

learn more… | top users | synonyms (4)

4
votes
3answers
722 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
181 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 ...
2
votes
1answer
140 views

How can I exhibit the evaluation of formulas in a Mathcad-like way?

How can I create a function F that works like this: x = 2 f1 = x^2 + 3 f2=x+5 F[f1] x^2 + 3 = 2^2 + 3 = 7 ...
11
votes
1answer
224 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: ...
10
votes
4answers
2k views

Why does Mathematica struggle with solving this equation?

Consider the evaluation of the following expression In[20]:= Reduce[ 1000 * 1.0609^t == 1500, t] ...
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. ...
7
votes
2answers
141 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
2answers
2k views

Inverse of a complicated function

Mathematica is struggling to find the inverse of this function f(r): ...
7
votes
1answer
730 views

How to find the smallest root

I have a continuous, differentiable, monotonic, bounded function called F[t]. If t -> Infinity then ...
6
votes
1answer
154 views

The third argument of the Root function

Consider the roots of an arbitrary indecomposable polynomial: sol = Solve[x^5 + 2 x + 1 == 0, x] The returned expression is ...
4
votes
2answers
470 views

How do I solve N simultaneous equations for N variables?

I have a function: f[x_] := x + 31 x^3 + 5 x^25 Which I want to find an expansion for: ...
3
votes
1answer
933 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 ...
3
votes
1answer
742 views

Solve pair of recurrence relations

[Corrected equations and added simple example] Can you solve a system of (loosely) coupled recurrence relations like this in Mathematica somehow? ...
2
votes
1answer
214 views

FindRoot giving false roots with Bessel Functions

I have read in some places about the errors associated with FindRoot, but the closest thing I can find on this website seems to be due to the imaginary unit. I am dealing with what should be a ...
2
votes
3answers
1k views

Solve and plot an equation that is dependent on a transcendental equation

I am trying to plot a function that uses the values of a transcendental equation as its input values: y = Tanh[(2 y + x)/2.5] z = 2.5 * Log[2*Cosh[(2 y + x)/2.5]] ...
2
votes
2answers
966 views

Why doesn't Mathematica solve $x=\cos\,x$ properly? [duplicate]

Why doesn't Mathematica solve x == Cos[x] properly? Both Solve and NSolve fail with the ...
1
vote
0answers
103 views

Nonlinear FEM and FindRoot

I'm trying to develop a kind of nonlinear FEM application using mathematica to solve a bvp like the following: $$ \gamma(u') ~u^{iv} + 2 \gamma'(u') u''' u''+ u''^3 = f(x) $$ where $u = ...
7
votes
1answer
182 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: ...
6
votes
1answer
142 views

Why is FindInstance failing when I relax a set of constraints?

I'm attempting to use FindInstance to generate coordinate sets for plausible triangles with edge length distance constraints. E.g.: ...
6
votes
3answers
374 views

Why don't I get numeric values from this Solve?

Solve[ a^2 + b^2 == c^2 && a < 100 && b < 100 && c < 100, {a, b, c}, Integers] gives me this result ...
6
votes
1answer
571 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 ...
6
votes
1answer
544 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 ...
6
votes
3answers
624 views

Arithmetic operation on the value returned by Solve

I want to modify the value that is returned by Solve. Example: SolC1 = Solve[Sin[ π x / L] == 1, x] {{x -> L/2}} I need to add n to x so that x becomes ...
5
votes
2answers
113 views

What are the Method options Solve command accepts?

What are the Method options Solve command accepts? Solve has the Method option, however documentation contains no methods that it accepts...
5
votes
2answers
337 views

Equation solving with GroebnerBasis

I have a system of quadratic equations defined below ...
4
votes
2answers
197 views

Why doesn't Roots work on a certain quartic polynomial equation?

In everything that follows I am using Roots to get the solutions to the equations. I start off with this equation: $$ \frac{A}{3}x^4 - x^2 + 2ax - b^2 = 0$$ Now ...
4
votes
2answers
398 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 ...
4
votes
4answers
795 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 ...
3
votes
1answer
133 views

Issue in ParallelTable after evaluating another function using NDSolve and FindRoot. What is wrong with this inverse?

I am trying to find the inverse of a function which is defined through NDSolve and NIntegrate. The question is pretty similar ...
3
votes
1answer
84 views

Aborts and beeps without error warning

I have a piece of code that generates a figure, performing a calculation to generate each pixel. At a certain resolution it runs fine, but after a high enough resolution it fails. Mathematica beeps ...
3
votes
1answer
171 views

Strange behavior of Reduce with a cubic equation

This equation: $(\frac{-a}{x})^2=\sqrt{\frac{1}{x}}$ at $a > 0$ and $x > 0$ has a clear solution $x=a^{4/3}$, doesn't it? However, ...
3
votes
1answer
313 views

Tips for efficiently solving large system coupled (nonlinear) ODEs

I'm trying to solve a system of nonlinear, coupled ODEs, where the governing equation for the $n-th$ ODE is of the form: $\sum_k^M Q_{nk} \ddot{a}_k -\sum_{\ell}^M\sum_k^M S_n(\ell,k) \dot{a}_{\ell} ...
3
votes
3answers
196 views

Speed up Eliminate

I have a set of trig equations, c1,c2,c3 are constants, I excepted the result is c1 c2 c3 r^2 + (c1^2 + c2^2 + c3^2 - 1) r + c1 c2 c3 == 0 but following code ...
3
votes
1answer
170 views

Finding the largest integer that cannot be partitioned in a certain way

I want to use Mathematica to solve the problem: Find the maximum $k$ such that $6x+9y+20z=k$ does not have a non-negative solution. I tried FrobeniusSolve. ...
3
votes
3answers
614 views

Solving Integrals

Here's a problem that I don't understand. f[x_] := Exp[Cos[3*x]] g[x_] := (1/3)*x^3 - x^2 + 2 When I try to find the limit: ...
3
votes
1answer
1k views

Finding the Minimum value of an interpolating function

I can't seem to use FindMinValue to find the min. value of a curve represented by an interpolating function. For instance the below code generates an interpolating ...
3
votes
1answer
390 views

wrong use of _?NumberQ?

I am having trouble with a numerical exercise. Here's a simplified version of my problem. I define two functions to find the solution to two constrained maximization problems: ...
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 ...
2
votes
3answers
135 views

Solve works with numbers but not number stored in variable

I have the code: ...
2
votes
1answer
339 views

Solve[Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] breaks when “Reals” is added?

Mathematica solves this equation fine: Solve[ Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] // InputForm ...
2
votes
1answer
115 views

Compact form for domain ranges of many variables

When one sets up an equation to solve one often needs to specify conditions on the variables such as { x>0 && y>0 && z>0 } This is not ...
2
votes
1answer
576 views

How could I define a function as the solution of equations in Mathematica?

I have posed a specific question yesterday but it may be too trivial to answer. I think the question could be asked in a more general way so it is easier to answer. Then I could solve the original ...
2
votes
1answer
108 views

Finding the root of a nested function with small values

I have reduced an error in my program to this line of code: FindRoot[Nest[# (1 - #) k &, 1/2, 2^4] - 1/2, {k, 3.5}] It works for $2^1, 2^2, 2^3, 2^4,$ but ...
2
votes
1answer
125 views

How to transform an expression using algebraical instead of pattern rules [duplicate]

I would like to transform rules algebraically. A very simple example would be: - k^2 - 2 k x + x^2 /. {2*k -> 1} This transforms to: - $$k^2-2 k x+x^2$$ ...
2
votes
2answers
393 views

FindRoot errors

I'm trying to solve a system of two equations in two variables for some range of parameter values. I use ContourPlot to see where I should look for a solutions and ...
2
votes
1answer
579 views

'not a valid variable' error when trying to solve 13 equations with 13 variables

I want to solve 13 variables by 13 equations. And here is my program: ...
2
votes
1answer
541 views

Linear Solve with Modular Arithmetic

I am interested in using LinearSolve[m,b] which will find a solution to the equation $m.x=b$, where I am in mod 2 arithmetic. Is there any way to perform this ...
2
votes
1answer
501 views

FindRoot Infinite expression 1/0 encountered error

I have 1 equation in 1 variable, which when I use Plot, looks like this: ...
2
votes
1answer
400 views

Inconsistent initial and boundary conditions

I have a 4th order nonlinear PDE with the following BCs and IC: ...
1
vote
1answer
49 views

Numerically Integrating to find a Maximum using NDSolve

I am trying to numerically find an equilibrium (maximum) of a function using its differential. The following is a simplified version. ...