# Questions tagged [equation-solving]

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

6,628 questions
Filter by
Sorted by
Tagged with
31k views

### What is the difference between Reduce and Solve?

Solve and Reduce both can be used for solving equations. Just by working with them, I know there are some differences between ...
• 1,759
7k views

### Updating Wagon's FindAllCrossings2D[] function

Stan Wagon's Mathematica in Action (second edition; I haven't read the third edition and I'm hoping to eventually see it), demonstrates a nifty function called ...
108k 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? ...
• 6,968
22k views

### How do I work with Root objects?

I want to solve the trigonometric equation : $$(3-\cos 4x )\cdot (\sin x - \cos x ) = 2.$$ I tried Solve[(3 - Cos[4*x])*(Sin[x] - Cos[x]) == 2, x] It returns the ...
• 4,523
29k views

### Find eigen energies of time-independent Schrödinger equation

I'm trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation, $-\frac{h^2}{2m_0}\frac{d^2\psi}{dx^2}+U(x)~\psi=Ei~\psi$ where U(x) is some potential and Ei is the ...
• 27.7k
13k views

### About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
• 4,835
3k views

### Does Mathematica have a built-in tool that allows one to operate on both sides of an equation?

Geogebra has a very neat CAS view that allows one to solve an equation step by step in the following fashion: $\quad \quad \quad \quad \quad \quad \quad \quad \quad$ You type an equation and can ...
• 5,441
18k 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 ...
• 734
6k views

### Nonlinear FEM Solver for Navier-Stokes equations in 2D

it's me again. I'm trying to obtain a numerical solution to Navier-Stokes equations in 2D in a non-rectangular region. So far, this guide was very helpful, but he is using finite differences, which is ...
• 2,396
4k views

### The Orbit and Perigee of the Flamsteed comet

Historical context This year we have the 330-th anniversary of the Battle of Vienna - one of the great formative events of European history, it took place on September 12, 1683. Kara Mustafa, Grand ...
• 57.6k
27k views

### Finding unit tangent, normal, and binormal vectors for a given r(t)

For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. I've got Mathematica, but I've never used it before and I'm not sure how to coerce ...
• 433
13k views

### Finding the intersection of a curve with an interpolation function

There are no issues trying to find the intersection points of two defined curves. ...
• 9,308
3k views

### Plotting the Star of Bethlehem

Christmas is around the corner! In preparation, consider the polynomial f[x_,y_]:= 1/10 (4 - x^2 - 2 y^2)^2 + 1/2 (x^2 + y^2) and define $r=(f_x,f_y)$ using the ...
• 1,005
11k views

### How to find numerically all roots of a function in a given range?

It is common that I search numerically for all zeros (roots) of a function in a given range. I have written two simple minded functions that perform this task, and I know of similar functions on this ...
• 7,076
386 views

### Solve slower in versions 9 and 10

With some systems of equations, Solve is much slower in versions 9 and 10 than in earlier versions, apparently because it is doing more simplification of the ...
• 6,221
3k views

### Fast calculation of discrete logarithms

Does Mathematica have any built-in fast algorithms for calculating discrete logarithms over $(\mathbb{Z}_p)^\times$ (the group of integers modulo $p$)? Essentially, for a fixed large prime ...
• 7,851
9k views

### How to get intersection values from a parametric graph?

I have this graphed: ParametricPlot[{2.4*Cos[t] + 1.6*Cos[3 t/2], 2.4*Sin[t] - 1.6 Sin[3 t/2]}, {t, 0, 4*Pi}] It is a star, and the lines cross each other twice ...
• 293
2k views

### Using the Krylov method for Solve: Speeding up a SparseArray calculation

I'm trying to implement this Total Variation Regularized Numerical Differentiation (TVDiff) code in Mathematica (which I found through this SO answer): essentially, I want to differentiate noisy data. ...
• 4,959
4k views

### Hightlight all the self-intersections of a Lissajous figure

This graph–also known as a Lissajous figure–contains so many self-intersections.How can I highlight them? ...
• 1,854
2k views

### Is there any predictor-corrector method in Mathematica for solving nonlinear system of algebraic equations?

The FindRoot function in Mathematica can easily be used to solve systems of nonlinear algebraic equations. But, I want to solve a system of nonlinear equations with ...
• 489
4k views

### Using results of Reduce

Suppose I have function f: f[x_, y_] := 50000 + x 30000 + y 35000; Now I want to find the x and y when f[]<=200000. I use Reduce: ...
• 4,014
24k views

### How to get rid of warnings when using Solve on an equation with inexact coefficients?

When I solve this equation in Mathematica 8, I can get the right answer, but with some uncomfortable warnings. Equation: ...
• 2,481
13k views

### Find all roots of an interpolating function (solution to a differential equation)

I'm trying to find all the roots of the solution to a differential equation. Using NSolve or Reduce I don't get the roots, so I'm using an iterative method which I found in physicsforums.com. This ...
• 445
9k 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 ...
• 6,908
8k 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: ...
• 15k
930 views

### Why does V 13.2 DSolve now return no solution instead of implicit solution for some differential equations?

V 13.2 DSolve now returns {} as solution for some ode's, while V 13.1 returns solutions for same ode's but with ...
• 148k
1k views

### 3D Elastic waves in a glass

Take an empty glass, hit the side, the glass will make a sound that can be recorded using ...
• 47.4k
10k 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 ...
• 465
2k views

### Is Mathematica ContourPlot function really so efficient?

I wanted to find the roots of the function $f(x,y)=\sin(3.2x)\sin(1.3y)-2.1 \sin(1.3x)\sin(3.2y)$. This is what the function looks like: ...
• 14.4k
5k views

### How do I split up a curve into chords 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 ...
• 1,106
963 views

### Bug in Solve (Mathematica 9)

The issue seems to be fixed as of Version 10.1. Just came across the strangest bug under both Mathematica 9.0.0 and 9.0.1. If one enters: ...
• 8,752
1k views

### Partitioning a number into consecutive integers

Consider n=45; then $$1+2+3+4+5+6+7+8+9=45$$ $$5+6+7+8+9+10=45$$ $$7+8+9+10+11=45$$ $$14+15+16=45$$ $$22+23=45$$ Question: how to find all representations of a ...
• 24.1k
3k views

### What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
• 3,047
2k views

### Numerically solve the initial value problem for the 1-D wave equation

I want to solve the standard 1-dimensional wave equation $y_{xx}=y_{tt}$ using NDSolve (for $y(x,t)$) with the following conditions: ...
• 313
2k views

### How can I simulate this toggle mechanism?

I've been introduced to Mathematica very recently. Basically, I haven't actually "solved" anything in my Mathematica lifetime, but I've done some simulations. With my fractional knowledge, I tried ...
2k 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 ...
• 7,921
12k 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 ...
769 views

1k views

### Find the equidistance curve between two curves

I have three function $f(x)=x^x$, $g(x)=\ln(x)^{\ln(x)}$, $h(x)=\ln(x)^2$ and I want to find (numerically) $C$ the center of the circle tangent to the three curves. I think that one way is to find ...
4k views

### Solve differential equation using a integral form boundary condition

I have a second order differential equation and I want to solve it analytically (DSolve) and numerically (NDSolve) with ...
• 327
3k 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 ...
2k views

I need to find an explicit expression in radicals for the real root of the quintic equation ...
• 7,273
2k views

### Behavior of Reduce with variables as domain

When using Reduce, I accidentally put a set of variables as the domain. To my surprise, it not only seems that Reduce expects ...
• 1,752
2k views

### Quiet doesn't work with FindRoot when using Brent method

Bug introduced in 9.0.1 or earlier and persisting through 12.3.1 or later The following has no solution: FindRoot[x == 1, {x, 0.25, 0, 0.5}] And Mathematica ...
• 6,695
236 views

### Reduce[Sin[x]==0,x] splitting odd and even multiples of Pi

as from Title, I'm wondering why Mathematica does not automatically give a single, simple solution for the problem Reduce[Sin[x] == 0, x] for which I obtain the ...
3k 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 ...
• 5,441