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

learn more… | top users | synonyms (5)

6
votes
2answers
269 views

Find a condition that b must satisfy so that Ax=b has solution

I'm new to Mathematica, so I'm sorry if this is really simple. I am trying to find the condition that vector b must satisfy so that Ax=b has solution. I would like to learn a general method, but I'll ...
1
vote
1answer
239 views

Why Integral does not converge?

I am trying to solve for $\Omega$ this nonlinear integral equation: $$1+\dfrac{z}{k^2}-\dfrac{z^2}{K_2(z)} \dfrac{\Omega}{k^3} \displaystyle\int_{1}^{\infty} \gamma^2\, \text{ArcTanh} \left(\sqrt{\...
0
votes
1answer
49 views

Errors only when code is iterated

Hello I'm trying to have two for loops sweep two parameters and for each 2-tuple of those parameters I want to solve a differential equation. To do this I have the following code: ...
5
votes
4answers
181 views

Solving Recurrence Equation $a_{n+1}=a_n(1-a_n)$

How to solve following recurrence equation $$a_0=2$$ $$a_{n+1}=a_n(1-a_n)$$ I tried: ...
0
votes
1answer
53 views

Reduce unable to solve simple inequalities with quantifiers

I have try to solve following inequalities using Mamthematica. But it unable to solve that. ...
0
votes
0answers
29 views

Finding results using qualifiers?

I have set of recursive function definitions and assumptions $\forall n.t1(n+1)=t1(n)-Y*S(n)$ $\forall n.t2(n+1)=t2(n)+S(n)$ and assumption $\forall n.n<K\rightarrow L1=L2*t2(n)+t1(n)$ I want ...
4
votes
1answer
1k views

How to take the derivative w.r.t. an arbitrary function?

EDIT: The answer posted by @Jens works for built-in functions only. However I'm starting to wonder if this is related to my Mathematica install somehow. I have version 7. Here is an example in the ...
1
vote
1answer
78 views

Solving two equations with modified Bessel functions

I am trying to solve two equations with Bessel functions in them, 1) C1*BesselK[0, 3.7268*10^-4*x] == 1.3*10^-6 2) ...
2
votes
1answer
54 views

Substituting values of variables in solution of a system of linear equations

After solving a system of 21 linear equations in 21 variables (called Xi in my code) I got the values for all the 21 variables, in the following way: ...
1
vote
0answers
24 views

Help Compiling Vectors using Iterations

So I have a nice code that runs properly, which I include below but, in my naiveté, I'm having issues iterating my procedure. Simply put, I have a function of two real variables $f(x,y)$ and I want ...
3
votes
1answer
81 views

Solve equation for a function as solution

I need to solve the following function: $$ h(z) = \sum^{40}_{k=0} \frac{k \, p(k)}{z- k \, h(z)} $$ where $p(k)$ is a probability distribution (in this case binomial with n = 40). Note that $h(z)$ is ...
0
votes
1answer
56 views

Arranging sides of an equation [duplicate]

I have to create my own function to solve equations (first and second degree). Assuming you have any input equation, how can I do to bring everything to the first side of the equation? Example. I ...
0
votes
0answers
36 views

Matrix with equations as entries - how to choose them and solve them

I have a matrix in Mathematica, which I have built using Normal[SparseArray]. Each entry of this matrix is an equation in one variable. What I need to do is 1) to select some of the entries of the ...
0
votes
1answer
35 views

Parameterize Subset of Complicated Zero Set

I recently asked this question: Evaluating Functions on Zero Sets (of other functions), and got fantastic assistance, but realized that there seems to be an extra issue when you're trying to ...
0
votes
0answers
24 views

Using the “reduce” function with s lot of equations and inequalities

I am using "reduce" to obtain all positive integers (plus 0) which satisfy a group of equations and inequalities. I have to automatize this procedure because I have to use "reduce" with at least 100 ...
3
votes
2answers
107 views

Evaluating Functions on Zero Sets (of other functions)

I have a highly non-trivial function, call it $f(x,y)$, in which I want to look at its zero set in the $(x,y)$ plane, and plot/evaluate a different function $g$ precisely along this zero set. I have ...
1
vote
2answers
121 views

Find all the non-negative integer solutions of a linear equation

For the linear equation x[1] + x[2] + x[3] + x[4] + x[5] == n Is there any efficient way to find all the non-negative integer solutions of this equation when n ...
0
votes
1answer
87 views

Solve equation with two different sets of replacement rules

I want to solve eqn for c0 in the following code. I want to do it with both replacement rules. I realize I could just use solve ...
0
votes
3answers
85 views

Interactive Application using Manipulate for Fibonacci Series

I am working on creating interactive app using Manipulate function on fibonacci series using SeriesCoefficient. I want to plot the fibonacci numbers based on the slider of Manipulate function. I have:...
14
votes
3answers
5k views

Solving a time-dependent Schrödinger equation

I want to solve the time-dependent Schrödinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t)$$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so that ...
5
votes
0answers
49 views

Is there a way to tell how much time FindRoot is spending calculating Jacobians?

I am solving a large number of trascendental equations by scanning FindRoot over a bunch of seeds and a bunch of different parameter values, and I would like to ...
12
votes
3answers
287 views

Archimedes' Scheme to find $\pi$

Given an Archimedes' scheme $$a_{n+1}=\frac{2a_nb_n}{a_n+b_n}$$ $$b_{n+1}=\sqrt{a_{n+1}b_n}$$ with initial values $a_0=2\sqrt{3},b_0=3.$ How do I prove using Mathematica that this converges to $\...
20
votes
1answer
298 views

Can Mathematica solve functional equations with nested variable?

First, inline free form input can solve these equations: But it seems no native Mathematica function can solve these, there is even an error page for equations of this form (nestdv). Now my ...
1
vote
3answers
150 views

NSolve or Solve or FindRoot

I need to solve this equation: A == M/(f d/2 (1 + Sqrt[1 - 3.53 (M/(b d^2 c))])) to find M, with: A = 0 to 19635 for intervals of 5 f = 500 d = 100 to 500 ...
0
votes
0answers
28 views

Question about # Symbol [duplicate]

I am trying to solve an equation and the solution includes # symbols. I read up on them but can't understand how they are related to my solution. I solved a simple trigonometric equation of third ...
15
votes
2answers
1k 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 ...
1
vote
1answer
78 views

Finding roots of Bessel function $y=3J_1(x)+xJ_1'(x)$ is returning inaccurate roots. Not Kernel bug [closed]

I can't figure out why Mathematica is returning the incorrect roots. The first five should be 2.9496,5.84113,8.87273,11,9561, and 15.0624 according to my textbook. ...
2
votes
2answers
66 views

How to find intersection points of linear and semi-logarithmic plots

Hopefully the title depicts what I am trying to do. Below is a figure of my calculations that is shown in logarithmic scale in the x-axis. I am trying to find a way to find the intersection point at ...
2
votes
1answer
63 views

Solving a big number of non linear equations

I have three trapezoids. The first sharing its upper side (I will call b_{i+1} in the code) with the second, the third sharing its lower side with the upper side of the second. All shared sides are ...
0
votes
0answers
34 views

How to speed up Solve command in Mathematica 8.0?

I have two complicated mathematical functions $f(s)$ and $g(M)$ that are complicated functions of $s$ and $M$ respectively. I would like to solve the equation $f(s)=g(M)$ in order to plot $s$ vs. $M$. ...
1
vote
1answer
67 views

Using NSolve for Elliptic Equations over Fundamental Parallelogram in Complex Plane [closed]

I'm considering solving elliptic functions over a fundamental domain of the torus with half-periods $\omega_{1}=\pi/2$ and $\omega_{2} = \pi \tau /2$, where $\tau$ is the modular parameter of the ...
0
votes
1answer
57 views

Solving equations with change of variables is not working?

I have the following expression $$\text{expr=}\int_0^{\infty}\frac{C\exp(-\frac{mx^2}{\Omega})}{\Omega^m}\frac{1}{\sqrt{2\pi}\lambda\Omega}\exp\left(-\frac{(\ln \Omega-\mu)^2}{2\lambda^2}\right)d\...
0
votes
2answers
65 views

Unable to plot function with exponentials or to find all roots [duplicate]

I am not able to Plot[(-1)^x + 2^x - 2 x - 1, {x, -4, 4}] directly. Some rework might be needed with complex branch cuts perhaps. There are real roots at $ x=3, ...
0
votes
1answer
122 views

NSolve takes too long time!

I am trying to solve the following problem numerically and I faced two things: 1- It takes too long time to give solutions. 2- there are many roots for the equation but NSolve doesn't give all thee ...
3
votes
1answer
91 views

How to efficiently find only the rational roots of a rational complex polynomial?

I need to find all the rational roots of a bunch of high-order polynomials with rational complex coefficients. Is there an efficient way to do this? My best effort on an example polynomial: ...
0
votes
1answer
37 views

Why do I not get a result when there is no error message? [closed]

I've typed in the following equation: Solve[((h*s + l - r*s - r)/(s^2 + s)) (1 + s) - h == (h*s + l - r*s - r)/(s^2 + s) - r, r] and it produces: ...
3
votes
1answer
51 views

How can I choose the coeffcients so that the givent system of equations has four integer solutions?

Consider the system of equations with unknown are $(x,y)$. $$\begin{cases} a_1x^2+b_1y^2 + c_1xy+d_1x + e_1y+f_1=0,\\ a_2x^2+b_2y^2 + c_2xy+d_2x + e_2y+f_2=0. \end{cases}$$ I want to find the ...
2
votes
0answers
112 views

Why can't Mathematica solve this equation? [duplicate]

Possible Duplicate: Can Reduce *really* not solve for x here? Why can't Mathematica solve this equation? ...
4
votes
1answer
104 views

Does Solve[] find ALL the exact roots of rational polynomials?

Does Solve[] find ALL the exact roots of rational polynomials? I've done a bunch of tests where I created an expression with some analytic roots, and Solve[] always found them all. But is the ...
10
votes
2answers
2k views

Error entering equation in DSolve

I entered a command incorrectly as follows: DSolve[{y'[x]=y[x]},y[x],x] I am now experiencing: ...
1
vote
1answer
154 views

How do you solve a linear equation of matrices? [duplicate]

The function Solve works fine for scalars: In[]:= Solve[A x - x B + C == 0, x] Out[]= {{x -> -(C/(A - B))}} When using matrices however, ...
1
vote
3answers
251 views

Find all roots of a function with parabolic cylinder functions in a range of the variable

I want to find all roots of a function involving Parabolic Cylinder Functions. In what follows, I define 2 variables $\xi1$ and $\xi2$, which in turn depend on $\omega$. My function is then defined as ...
11
votes
1answer
241 views

NDEigensystem returns incorrect eigenvalues for 2D coulomb problem, eigenfunctions contain discontinuity

I posted a similar question a short time ago regarding the 3D Coulomb problem. Jens' excellent answer to this thread allowed me to obtain the correct eigenvalues and eigenenergies for that system. I ...
9
votes
3answers
993 views

Implement the Bisection algorithm elegantly and easily

Description: Rencently, I have finished my course Numerical Analysis, so I'd like to implement many algorithm that I have learned from that course.By this practice, I hope that I can improve my ...
2
votes
0answers
75 views

Complicated implicit plotting - can it be tackled?

I'm quite new to Mathematica and have already spent tons of time on problems of this type, browsing through tutorials and topics here. I'm now coming to conclusion that it cannot be done and am about ...
1
vote
1answer
46 views

NRoots Results: From Equations to List of Root Values [closed]

When I use Roots/NRoots, I get a disjunction of conditions as result. The conditions are normally of the type x == value How can I convert this to the list of root values?
0
votes
1answer
78 views

How to find roots using the bisection method [duplicate]

First I plot the function and then I try to find a domain such that I can see the curve cut through the x-axis. I do this via trial and error ...
0
votes
0answers
38 views

Recycle boundary condition

I'm having the following issue that can not find a solution , by using this boundary condition u[0, t] == 2 u[1, t] that Mathematica does not understand, someone ...
4
votes
2answers
333 views

Roots of Whittaker W function

I am interested in finding the roots $u$ of the equation $$ W_{1,\imath b}(a)=0, $$ where $W_{\kappa,\mu}(z)$ denotes the Whittaker $W$ function, $a>0$ is a fixed parameter, $\imath=\sqrt{-1}$ and $...