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
1answer
371 views

2 non-linear equations with 2 unknowns which I cannot solve

I have the following equations and I would like to solve them in Mathematica anyway. Numerical results are very much welcomed. However, when I use the command ...
2
votes
1answer
554 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
525 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 ...
-1
votes
1answer
653 views

Help to solve Simultaneous Equations

I think this should be easy to numerically solve in Mathematica, but for some reason I'm not finding the correct way to do it. I basically want to solve these simyltaneous equiations: ...
0
votes
1answer
227 views

FindRoot on a 2D list of Equations

I have a $n \times k$ Matrix of data that I want to feed into an equation and solve for an unknown variable. I suppose I can always just convert the Matrix into a long Array but I'd like to learn how ...
2
votes
1answer
306 views

Defining regions for `Exclusions`

I have the following function I want to plot in 3D (For simplicities sake we can say $a=5,b=-1,c=3$.) ...
10
votes
1answer
790 views

How do I find all the solutions of three simultaneous equations within a given box?

Sometimes, one needs to find all the solutions of three simultaneous nonlinear equations in three unknowns $$\begin{align*}f(x,y,z)&=0\\g(x,y,z)&=0\\h(x,y,z)&=0\end{align*}$$ within a ...
3
votes
1answer
188 views

Tracking FindRoot errors in NestWhileList and Table

I'm solving many systems of two equations by varying the initial parameters. I'm running FindRoot in a NestWhileList where the ...
2
votes
1answer
377 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 ...
1
vote
3answers
348 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: ...
6
votes
2answers
368 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
325 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
421 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 ...
5
votes
2answers
1k views

Solving a trig equation

I am trying to find an explicit solution to a trigonometric equation. It is running for a long time and I didn't get any result, but Maple solves it quickly. Why ? ...
3
votes
1answer
515 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\, ...
2
votes
1answer
264 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 ...
0
votes
1answer
189 views

How to solve this equation? [closed]

The numbers real x and y, are solutions of the following equation system : $$ \{x^3 + 3x^2y + 3xy^2 + y^3 2\sqrt2$$ $$ \{x^3 - 3x^2 + 3xy^2 -2y^3=0 $$ . $$ x^2 + y^2$$ How to solve it ?
4
votes
1answer
616 views

Reduce an equation by putting a new variable

I have the following equation given: $$ (26-x)\cdot\sqrt{5x-1} -(13x+14)\cdot\sqrt{5-2x} + 12\sqrt{(5x-1)\cdot(5-2x) }= 18x+32. $$ In order to solve it, I want to substitute $t = \sqrt{5x - ...
15
votes
1answer
651 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) ...
0
votes
1answer
336 views

(N)Solve does not solve equation

I am trying to calculate where a beam hits a mirror. The mirror is described by this curve (two facing spherical mirrors): ...
5
votes
2answers
238 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
267 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$. ...
11
votes
4answers
490 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 ...
1
vote
1answer
398 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 ...
7
votes
3answers
988 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: ...
24
votes
3answers
7k views

Marking points of intersection between two curves

I'm trying to illustrate the solutions numerically and graphically for an equation such as Tan[x] == x. I think I did everything ok except I wanted to mark each ...
3
votes
1answer
371 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: ...
6
votes
3answers
366 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 ...
1
vote
1answer
677 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 ...
4
votes
2answers
661 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?
2
votes
1answer
480 views

FindRoot Infinite expression 1/0 encountered error

I have 1 equation in 1 variable, which when I use Plot, looks like this: ...
3
votes
1answer
378 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$: ...
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 ...
3
votes
2answers
723 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\ ...
8
votes
2answers
700 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: ...
4
votes
1answer
309 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 ...
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
3answers
368 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 ...
4
votes
1answer
945 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 ...
2
votes
1answer
2k views

Can Mathematica help to rearrange an equation?

I have an equation which I want to rearrange so one variable is on the left side by itself. Normally, I would do this with basic algebra and identities. However, is it possible to use Mathematica to ...
15
votes
1answer
327 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 ...
11
votes
2answers
751 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}$ ...
1
vote
1answer
2k 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= ...
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}] ...
0
votes
1answer
988 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
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 ...
8
votes
4answers
576 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
1answer
846 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 ...
12
votes
2answers
869 views

How do I split up a curve into segments of equal length?

I have a curve that is defined as f[x] and what I'm attempting to do is to divide the curve into equal straight lengths for a number of segments of my choosing that I've defined as nSeg. I've created ...