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
3answers
354 views

equation solving problems

I have some equation: $$ veq=-2-lr-l^2r+2(r+ir^3\omega) v' + (-2+r)r^2v'^2 + (-2+r) r^2 v''==0 $$ or in Mathematica form: ...
2
votes
1answer
387 views

How to solve simultaneous equations faster with Compile?

I have large 6x6 matrix Uwhich is a multiplication of 15 rotational matrix. All of the elements are Sin\[theta] and ...
6
votes
2answers
380 views

Reduce and Solve unable to solve equation

I have the following equation. Why aren't Solve and Reduce able to find the solution? ...
1
vote
2answers
351 views

Replacing variable in an equation with an Interpolating function polynomial and plotting residual

I was trying to plot the residual for the solution of my PDE. However, I was unsure about a couple of things. I imported the data and created an Interpolation polynomial with ...
3
votes
2answers
434 views

Is there a way to solve the Apollonius Circle problem in Mathematica?

Assuming x, a, and b are complex numbers, is there a way to reduce the equation Abs[x - a] == k Abs[x - b] to something like ...
2
votes
1answer
268 views

How to solve a symbolic equation with symbols in powers

I am trying to solve $\dfrac{\rho\ ((1-b)\ \lambda _f\ \lambda _s\ P _A)^{\rho }}{b-1}+\dfrac{\rho \left(\dfrac{b\ \text{ps}\ x}{1-\text{ps}}\right)^{\rho }}{b}=0$ in terms of $b$, I ...
15
votes
1answer
683 views

Why does repeating an equation help in FindRoot?

I'm trying to understand this behavior of FindRoot. Consider a sample function (the one I'm actually interested in is far more complicated, but has similar issues) ...
5
votes
2answers
240 views

Solve for $a$ as a function of $\beta$?

I am trying to solve this equation: $$\beta^{-a} \Gamma(a) \sin(a \pi) + e^\beta \beta^{2 a - 1} \Gamma(1 - a) \sin(a \pi) = 0$$ I tried the following: ...
0
votes
1answer
276 views

Iterative way to find roots of confluent hypergeometric function

I am trying to find roots of confluent hypergeometric function and I wonder if I can choose the initial guess by the choice of $\beta$. ...
1
vote
1answer
428 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 ...
11
votes
4answers
500 views

How to make a Line[] with no end?

I'm trying to do this: In this graph, the secant points are aproximated in order to become the tangent, it seems I need some kind of function which plots a line based on two points and it's points ...
3
votes
1answer
403 views

Selecting polynomial roots and plotting against parameters

An implicit function $f(x,k)=0$ is quadratic in $x$ and contains one parameter $k$ which I must vary. Using Solve, I get two real solutions for each specific $k$: ...
2
votes
1answer
508 views

FindRoot Infinite expression 1/0 encountered error

I have 1 equation in 1 variable, which when I use Plot, looks like this: ...
4
votes
2answers
740 views

How can I solve the equation with integers as a solution?

I want to solve the equation $$(x-1)^2 + (y-1)^2 + (z-1)^2 = 49$$ where $x$, $y$, $z$ are integer and $x \neq 1$, $y \neq 1$, $x \neq 1$. How do I tell Mathematica to do that?
3
votes
1answer
396 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: ...
1
vote
1answer
698 views

FindRoot inside Table

(MWE at the end of the post) I need to solve a non-linear equation $f(y;x_1,x_2,..,x_5)$ in one variable $y$ and then compute 4 new output expressions, for over 60 different initial parameter inputs ...
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 ...
8
votes
2answers
747 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: ...
3
votes
2answers
759 views

Numerically Solving two dependent Transcendental Equations

I need to solve a system similar to the following (Except it is quite large. Solving this ought to do the job): $$ \tan[2f(t)] = 1+ t^2\ $$ and $ f(t) $ is $ k $, such that$$ \tan[2kt]-(1+k^2) = 0\ ...
4
votes
1answer
312 views

pH calculations, speeding up code involving Solve

I'm trying to calculate pH values of solutions containing water and acetic acid. The relevant equations have been defined and I now want to find a solution using Mathematica. For a specific acid ...
10
votes
1answer
593 views

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

How can I find roots of polynomial in extension field $GF(2^n)$?
4
votes
3answers
382 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 ...
2
votes
1answer
1k views

Solving a system of equations in two variables

I have a system of two equations in two variables $x$ and $y$. $$\begin{align} F_1(a,b,c,d,e)x+F_2(a,b,c,d,e)y+F_3(a,b,c,d,e)&=0\\ G_1(a,b,c,d,e)x+G_2(a,b,c,d,e)y+G_3(a,b,c,d,e)&=0 ...
4
votes
1answer
994 views

Efficient implementation of cubic equation of state

...In this case the Peng Robinson Equation of State. Equations of state are empirical equations with parameters derived from experimental data. They are used to predict pure component and mixture ...
6
votes
2answers
401 views

How to work out the parameter in a definite integration which has an exact value while the integration doesn't have an analytical solution?

Here is the equation I'm trying to solve: NIntegrate[1/(E^(1/(λ T)) - 1), {λ, 200, 220}] == 1000 T is the parameter I'm ...
11
votes
2answers
791 views

Trying to fit an unknown extreme distribution

First up, I'm quite new to Mathematica so any hints on better code would be greatly appreciated. I have some histogram frequency data from an unknown distribution that I'm trying to fit. Here's the ...
4
votes
1answer
1k views

Solve system of equations related to perspective projection

I'm trying to solve system of equations. I have 4 points before perspective projection and after and I whant to obtain matrix of perspective projection $m_{i,j}$ ($x,y,u,v$ are known , $m_{i,j}$ ...
3
votes
2answers
173 views

Why didn't Reduce give me the right result?

My code: Clear[r1, r2]; par[r1_, r2_] := r1 r2 / (r1 + r2); Reduce[{5 par[r2, 32000]/(r1 + par[r2, 32000]) == 1.8 && par[r1, r2] == 5000}, {r1, r2}] ...
1
vote
1answer
3k views

solve non-linear system of equations

I have a system of equations and I want to solve it to get x, y $$\begin{cases} u= C_{1}+(x-C_{1})(1+k_{1}((x-C_{1})(x-C_{1})+(y-C_{2})(y-C_{2}))) \\ \\ v= ...
1
vote
2answers
1k views

Find the dimensions of a cylindrical can that will minimize the cost of the material

A cylindrical can is to be made to hold 1 L of oil. Find the dimensions that will minimize the cost of the metal to manufacture the can. This is a standard calculus problem. The volume of the ...
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) : ...
5
votes
1answer
913 views

How Can I use Solve/Reduce Output

Suppose I want x and y to be rationals Solve[ x^2 + y^2 == 1, {x, y}, Rationals] I am ...
6
votes
3answers
626 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 ...
6
votes
1answer
296 views

Buggy Reduce/Resolve function?

It seems to me that this is a clear-cut case of Mathematica actually producing the wrong answer (with no warnings). I'm trying to express the fact that for any integer, there exists a factorization ...
2
votes
2answers
1k views

How to plot an inequality?

I need some help in plotting the following inequality using Mathematica: $$\frac{1+(x/100+0.1)\times y/100}{1.15+1.15\times(x/100)\times(y/100)}\geq 1$$ assuming $x,y\in \mathbb{Q}$, the set of ...
7
votes
1answer
579 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 ...
10
votes
3answers
273 views

Problems Computing (in a reasonable amount of time) Solutions to a System of Inequalities

For my Cryptography research I am interested in finding solutions to the following inequalities in terms of $r$ and $s$, where $p$ is some fixed constant. $$\begin{align} 2^{p - s + 4} + 2^{p - r} + ...
1
vote
2answers
310 views

solving for one solution to a system of polynomials

I'm trying to solve a system of equations: ...
2
votes
2answers
2k views

Root finding in Mathematica

I am new to Mathematica. I have used the WolframAlpha online calculator to find roots of equations (listed under the heading Root in the output generated in ...
6
votes
3answers
974 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
387 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 = ...
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$ ...
6
votes
1answer
546 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
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 ...
8
votes
2answers
267 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: ...
2
votes
1answer
347 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 ...
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 ...
11
votes
2answers
574 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 ...