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

learn more… | top users | synonyms (4)

0
votes
1answer
271 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
492 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
412 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
997 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
380 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
369 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
684 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
700 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
489 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
389 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
735 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
716 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
310 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
376 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
964 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
333 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
768 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
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= ...
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}] ...
2
votes
1answer
1k 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
579 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
871 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
901 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 ...
6
votes
2answers
398 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 ...
5
votes
1answer
222 views

Incompleteness of FindInstance

I've been playing around with Resolve and FindInstance. I know that Resolve should always ...
6
votes
1answer
287 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 ...
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) : ...
9
votes
3answers
631 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 ...
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 ...
6
votes
1answer
566 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
272 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
304 views

solving for one solution to a system of polynomials

I'm trying to solve a system of equations: ...
6
votes
3answers
935 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
378 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
191 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
369 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
537 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
174 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
254 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
962 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
638 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
567 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 ...