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

learn more… | top users | synonyms (4)

7
votes
0answers
414 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
181 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 ...
6
votes
0answers
108 views

FindRoot kills kernel

Bug introduced in 7.0.1 or earlier. Persists through at least 10.0.1. I'm having problems with FindRoot killing the kernel. In my real application, I want to FindRoot on a black-box function ...
5
votes
0answers
78 views

Using quantifiers with free indices as declarative conditions in equation solving

This is a toy example: Is there a way to rewrite ...
5
votes
0answers
895 views

Solve huge symbolic system of linear equations

I have a system of 76 symbolic linear equations (i.e. some coefficients are symbolic) with a sparse coefficient matrix. However, neither Solve[] nor ...
5
votes
0answers
84 views

Faster way to perform SameQ[Reduce[…], Reduce[…]]

I'm have some expressions that I need to confirm the equality of. SameQ[Reduce[...], Reduce[...]] works like a charm for the more simple expressions, however when ...
4
votes
0answers
183 views

How to get vertices of a polytope given by equalities and inequalities?

I have a polytope given by some equalities and inequalities, how can I get all the vertices of the polytope? If there's a way to deal with the one given by inequalities only, how can I reduce the ...
4
votes
0answers
140 views

Solving a nasty equation

Here's an equation that I need to solve for $t_k$ $$ \theta_0 = \tan^{-1}\left(\frac{2(w_x - m)}{p - g {t_k}^2 - 2 t_k w_y}\right) - {\frac{1} {r}} \left( \left(\frac{m}{t_k}\right)^2 + \left( ...
4
votes
0answers
112 views

Symbolic solution to ODE, pure InverseFunction not evaluated

I'm new to Mathematica and I don't understand why in the solution of the following ODE, the #1 in the pure function is not immediately replaced by the corresponding ...
3
votes
0answers
196 views

Function with a sharp resonance which Mathematica fails to integrate. Why?

I'm a new user of Mathematica and I'm trying to use it to calculate the collisional cross-section as a function of energy for a given potential and decay rate. I know that the resulting function ...
3
votes
0answers
100 views

Solving huge equations

I have this expression: $d=-\frac{\sqrt{\frac{780 (f+130) \left(5 d^2 (13 c+f+130)-5 d (c (f+1300)-325 (f+160))+125 \left(2 (2 c+725) f+5 f^2+104000\right)+13 d^3\right) \left(5 d^2 (52 c+17 ...
3
votes
0answers
86 views

Deciding whether a semi-algebraic set is empty. Which command is best?

[Update] I was able to prove that the "larger" set $ 1\ge x \ge y,w \ge 0$ and $p(x,y,w)>0 $ is empty with another computer algebra system in my slow laptop in few minutes but in Mathematica even ...
3
votes
0answers
390 views

FindRoot gives a wrong solution which obviously should not be there

I got stuck on FindRoot and I didn't see any similar problem posted, so let me explain what I am trying to do and what problem I meet here. I try to find roots of a particular function, which in the ...
3
votes
0answers
142 views

RSolve not returning known solution

I have the following recurrence relationship for which I know the solution is given by a binomial distribution: ...
3
votes
0answers
944 views

Solving a system of nonlinear equations self-consistently

I am trying to solve a set of three non-linear equations in Mathematica. I need help with them. The Mathematica code (in plain text format) is attached below. If you copy & paste the code below ...
2
votes
0answers
85 views

What is the algorithm behind Mathematicas Reduce in this equation?

Mathematica can use Reduce to arrive at an answer in this equation ...
2
votes
0answers
86 views

Solving a system of two nonlinear equations with many symbolic parameters

I have two nonlinear equations with two unknowns, $x$ and $y$, and many symbolic parameters, $a, b, c, d$. They look someting like: $\frac{1}{x}(1+x)^a (1-b)(cx+dy)=0$ ...
2
votes
0answers
68 views

Solving a system of difference equations in an exponential steady-state growth setting

I have a system of difference equations in an exponential steady-state balanced growth setting; all variables grow at the same steady-state rate, say, $g$. I use the notations as follows: Variable $X$ ...
2
votes
0answers
60 views

Error when using EquationTrekker

I just got to know EquationTrakker because I need to do phase graphs for my classes. When I load it ...
2
votes
0answers
59 views

How to solve for exponents in an infinite product?

Say I have a power series, $f(x,y) \in 1 + x\mathbb{Z}[[x,y]]$ Then it admits a unique expansion $$f(x,y) = \prod_{i=1}^\infty \prod_{j=0}^\infty (1 - x^i y^j)^{n_{i,j}}$$ for some integers, $i, ...
2
votes
0answers
82 views

Quartic equation

After using Solve I am choosing the physical root of my equation and dealing further with this root. However, when I am changing parameters using Manipulate, I clearly see not smooth behaviour. Is ...
2
votes
0answers
71 views

How to handle infeasible points in FindRoot?

I am calling FindRoot[f[x,y],{{x,xInit,xMin,xMax},{y,yInit,yMin,yMax}}] where for some points {x,y}, ...
2
votes
0answers
44 views

Equation involving hypergeometric functions

I want to solve this equation but nor NSolve nor Solve are able to do this. ...
2
votes
0answers
116 views

Question about Solve

I don't understand what Mathematica is doing to get these solutions. I ask it to solve two equations, the left hand side of both expressions are the same, the right hand sides differ by a ± sign. I ...
2
votes
0answers
106 views

Equation Solving: Solution in terms of predefined functions

Is there a way that I can have Mathematica give me the solution of a problem it has solved in terms of functions that I have predefined? The specific problem I'm trying to solve is: ...
2
votes
0answers
158 views

Using WhenEvent for derivative of discontinuous function

I have a discontinuous function ($u(t)$, a square wave) and I would like WhenEvent to trigger when the signal goes high/low, i.e. when the value of $u(t)$ changes. ...
2
votes
0answers
181 views

Problems with Simultaneous Equation Solving

Let me first explain what I am doing and then I will explain the problem that I can't figure out. I am basically trying to solve 2 equations for 2 unknowns (a1 and ...
2
votes
0answers
356 views

I can't solve this set of equations

I am having trouble solving a set of equations in mathematica. I do not get any errors, but i don't get any answers as well. I have some restrictions on my parameters and variables in the equations ...
2
votes
0answers
132 views

Nest for large value of n

I am working on a problem to find the Feigenbaum constant. In this problem I have to get $f^{2^n}(1/2)$ with $f(x) = kx(1-x)$. I use Nest to get $f^{2^n}(1/2)$ but ...
2
votes
0answers
269 views

Conditional statements in intial conditions?

This is potentially a daft question, but I thought I'd ask it; I have some material free to diffuse in a boundary between rn and ro; I've been able to get it working nicely for neumann type boundary ...
2
votes
0answers
282 views

differential equations with implicit functions

I have an ordinary differential equation that contains coefficient functions that depend implicitly on the independent variable via an algebraic equation. I am trying to go ahead and use NSolve to ...
2
votes
0answers
144 views

Why is FindRoot initial value far from the specified one?

I am trying to numerically find the root of a function that looks a bit like: 1/x - (SchurDecomposition[A[x]][[2]])[[1]], where ...
2
votes
0answers
181 views

Solving $k\log(n) - k\log(k) \leq u$

How can I persuade Mathematica to help me find solutions to the inequality $k\ln(n) - k\ln(k) \leq u$ over the reals, assuming $u \geq n \geq k \geq 1$. When I evaluate ...
2
votes
0answers
194 views

Am I entering this 2-variable recurrence correctly?

I'm trying to solve this recurrence with two variables. ...
2
votes
0answers
263 views

FindRoot - Speed and errors

I am using FindRoot[] to solve a complicated equation. It seems I get the correct answer even though I get errors about an ...
2
votes
0answers
381 views

Numerically/Analytically Solving a System of Equations

I have $6$ functions $f_i(x,y,z)$, $(i = 1, \ldots, 6)$ in three variables $x,y,z$, and I would like to find a simultaneous instance of these variables, say $(x_0, y_0, z_0)$, such that $f_i(x_0, y_0, ...
1
vote
0answers
35 views

Creating a matrix from a list of simultaneous equations

I have a list of n simultaneous equations of the form, w A[n] = (K[n,n+1]+K[n-1,n])A[n] - K[n,n+1]A[n+1] - K[n-1,n]A[n-1] ...
1
vote
0answers
67 views

Comparing two ways of fitting systems of ODEs to data

I'd like to ask you if you see any difference between the two following ways of estimating parameters. Given my system of ordinary differential equations that I want to use to find the values of all ...
1
vote
0answers
62 views

Stability region of midpoint method using Solve and RegionPlot

I've been trying to obtain the stability region in the $(\lambda_R, i\lambda_I)$ plane of the midpoint rule $$y_{n+1}= y_{n-1}+2h\dot{y}_n,$$ for the model problem $\dot{y}=\lambda y$. The roots for ...
1
vote
0answers
76 views

How can I solve an equation where indexed variables get updated during iteration?

I am trying to solve for a root for a certain equation, but some of the variables in this equation are indexed and get updated during iteration. The code that I am interested in is like the following: ...
1
vote
0answers
114 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 = ...
1
vote
0answers
119 views

Finding Values of All Nine Constants in q-hypergeometric Equation

I suspect that an identity of the form $$\sum_{j=-n}^{j=n}(-1)^jq^{j(5j+1)/2}=\sum_{r=0}^{n}f_{ar+bn+c}(-1)^{n-r}q^{(n-r)(dr+en+f)/2}\frac{(q;q)_{gr+hn+j}}{(q;q)_{n-r}}$$ for $a, \dots , j$ integer ...
1
vote
0answers
39 views

RSolve works slow and does not give an analytical solution for solving high order linear difference equations

RSolve@@{{a[n]-a[n-10]==101}~Join~Table[a[i+1]==101+10i,{i,0,9}],a[n],n} I want to get the exact form of general formulas, but ...
1
vote
0answers
122 views

Solving Thue equations

A Thue equation is a 2-variable homogeneous integer polynomial of degree at least 3. It's well-known that such equations have only finitely many solutions over the integers. I'm trying to solve some ...
1
vote
0answers
32 views

Correct use of Mathlink's MLGetRealList

I am attempting to use Mathlink from C. I have managed to return single values from mathlink to my c program, but I am having trouble with lists. Consider the Mathematica operation: ...
1
vote
0answers
171 views

FindRoot in range

I am trying to find all roots in a range, using y /. FindRoot[Sin[y] == 0, {y, #}] & /@ Range[7] which gives ...
1
vote
0answers
32 views

How can I select two lists from a list of lists so that I receive the system of equations has only rational solutions?

I want to make a sytem of equations has the form $$\begin{cases} a_1x^2+b_1y^2 + c_1xy+d_1x + e_1y+3=0,\\ a_2x^2+b_2y^2 + c_2xy+d_2x + e_2y+3=0. \end{cases}$$ so that the given system of equations has ...
1
vote
0answers
62 views

Finding undetermined coefficients with boundary conditions

I have 2 equations which are; To[x_] := c1 E^(-a1 x)/2 + c2 E^(a1 x)/2 + a2 Tu[x_] := c3 E^(-a3 x)/2 + c4 E^(a3 x)/2 Tu equals almost zero ...
1
vote
0answers
82 views

What are the hidden specifications for FindRoot

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system" (or a nonlinear equation I ...
1
vote
0answers
140 views

Calculating derivatives of roots of equation

I am interested in calculating how the roots of an equation change as one of the variables does, when the equation is evaluated numerically rather than symbolically. I have edited this code to be ...