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

learn more… | top users | synonyms (4)

9
votes
2answers
2k 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 ...
15
votes
4answers
8k 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?
44
votes
2answers
3k 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 ...
13
votes
4answers
6k 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 ...
39
votes
8answers
2k 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 ...
16
votes
6answers
4k 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 ...
8
votes
3answers
1k views

First positive root

Simple question but problem with NSolve. I need help how to extract first positive root? For example: ...
5
votes
1answer
951 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 ...
6
votes
2answers
603 views

Solve an equation in $\mathbb{R}^+$

How can I solve this equation (both numerically and literally) only in the positive reals $\mathbb{R}^+$? Solve[x == (v0 - (A CD t v0^2 ρ)/(4m)) Cos[θ] t, t] And ...
16
votes
4answers
2k 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 ...
16
votes
2answers
3k 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 ...
7
votes
3answers
1k 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: ...
3
votes
1answer
172 views

When does the real part of Zeta vanish on the critical line?

This seems to be a quite a simple problem but I cannot make it work. I am trying to find all values within a given range for which the real part of the Zeta function vanishes on the line: ...
19
votes
4answers
3k 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 ...
4
votes
2answers
768 views

Can mathematica solve this equation?

I have the following Mathematica code to solve an equation coming from isoparameteric finite element for quadratic tetrahedron element. I need to get the iteroplation fast and accurate. I only find ...
7
votes
2answers
498 views

How do I solve this equation?

I want to solve the equation $$ f(f(-1)) = \sqrt{2} + g(f(2)), $$ where $$f(x) = \dfrac{a}{x^2} - 3x + 2, \quad g(x) = a\cdot \sin 2x$$ $a$ is unknown. The solution is $a \approx{-5.81}$. I tried ...
5
votes
1answer
389 views

Issue with NSolve

I defined the following function: sw[ θ_, ϕ_, h_] = 1/2 Sin[2 (ϕ - θ)] + h Sin[ϕ] Based upon whether I use Solve or NSolve, ...
12
votes
2answers
848 views

How can I implement the method of Lagrange multipliers to find constrained extrema?

I want to form the function $h=f-\lambda_{1}g_{1}-\lambda_{2}g_{2}$ where $f$ is the function to optimize subject to the constraints $g_{1}=0$ and $g_{2}=0$ so that I can solve the first partial ...
11
votes
6answers
2k views

How to find lattice points on a line segment?

How do I find points on the line segment joining {-4, 11} and {16, -1} whose coordinates are positive integers?
11
votes
4answers
520 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 ...
9
votes
2answers
475 views

Solving/Reducing equations in $\mathbb{Z}/p\mathbb{Z}$

I was trying to find all the numbers $n$ for which $2^n=n\mod 10^k$ using Mathematica. My first try: Reduce[2^n == n, n, Modulus -> 100] However, I receive ...
4
votes
1answer
651 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 - ...
7
votes
3answers
416 views

Efficient code for solve this equation

We have $a*b*c=-1$, $\frac{a^2}{c}+\frac{b}{c^2}=1$, $a^2 b+a c^2+b^2 c=t$ What's the value of $a^5 c+a b^5+b c^5$? I tried ...
4
votes
2answers
955 views

How to find regions that satisfy this inequality?

I am new to Mathematica and would like to find the set $$\{ (x,y) \in \mathbb{R}^2: (3x+y\exp(xy))(x-a) + (6y + x \exp(xy))(y-b) < 0 \}$$ for some constants $a$ and $b$. How can I do ...
2
votes
1answer
670 views

Error/warning when using NSolve for simple equation

I am using NSolve to solve an equation, as shown here: ...
2
votes
3answers
709 views

Using DSolve to solve for x[t,parameter]

I'm trying to solve an ODE with two independent variables (a cannon firing from a cliff incorporating wind resistance dependent on velocity). I've tried the following for the x-component: ...
-1
votes
3answers
934 views

How do I determine the maximum value for a polynomial, given a range of x values?

I need to determine the maximum value for y = a x^2 + b x + c, where I know the coefficients and the upper and lower x values. ...
10
votes
3answers
3k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger 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 ...
24
votes
3answers
8k 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 ...
6
votes
4answers
394 views

Am I missing anything? Solving Equations

I want to know what $ a^4+b^4+c^4 $ would be when $ a+b+c=1, a^2+b^2+c^2=2, a^3+b^3+c^3=3. $ I tried ...
6
votes
1answer
217 views

How to substitute the following conditions into an expression?

I have an expression: $p=a\;b\; x + b^2\; y + a\;c\; z$. I want to substitute $a\;b=1$, $b^2 = 2$ and $a\;c = 4$ to obtain $p = x + 2y + 4z$. How can I tell Mathematica to do that? I dont know how to ...
0
votes
2answers
457 views

Classification of a linear system of equations with a parameter

I need to get every possible value of k that returns infinite number of solutions or no solution to this system: ...
12
votes
2answers
976 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 ...
10
votes
1answer
837 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 ...
10
votes
3answers
587 views

Finding “Maxima” and “Minima” on a B-Spline

I need to find the "Maxima" and "Minima" on a B-Spline or more correct the points where the 2nd components of the derivate equal zero. For example: ...
9
votes
5answers
558 views

Create filling between two trig functions

Working with trig functions, period, amplitude, etc. I found a worksheet at a calculus website, with some nice questions related to interpreting trig functions, at least, they provide some "fun" ...
11
votes
2answers
882 views

NSolve gives additional solutions that don't satisfy the equations!

I am trying to solve the following polynomial equations in Mathematica: ...
10
votes
4answers
400 views

Solve symbolically a transcendental trigonometric equation and plot its solutions

I currently have the equation below for a beam with a hinge at various locations, the variable a can vary between 0 and 0.5. $$ Tan\left( {a\sqrt \alpha } \right) + Tan\left\{ {\left( {1 - a} ...
8
votes
3answers
1k 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] ...
3
votes
1answer
440 views

How do I solve $1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x))= 0$?

Consider the equation $$ 1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x)) = 0 $$ where $A,B \in \mathbb{R}$ are constants. What is the analytic solution?
8
votes
3answers
499 views

How do I make Reduce yield all solutions explicitly?

Say I want to do the following: Reduce[ x+y+z==1, {x,y,z}, Modulus -> 7 ] then I get a solution with parameters, C[1] : ...
6
votes
2answers
1k views

NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
3
votes
2answers
501 views

All possible solutions to the Matrix Equation (free variables appearing)

I am attempting to solve a system of linear equations using LinearSolve[] . In my case, the number of unknowns are more than constraints. I learnt that LinearSolve ...
6
votes
5answers
4k 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: ...
16
votes
1answer
678 views

Bug in Solve (Mathematica 9)

Just came across the strangest bug under both Mathematica 9.0.0 and 9.0.1. If one enters: Solve[m == p Sin[x] && -Pi/2 < x < Pi/2, x] ... then ...
10
votes
3answers
322 views

FindInstance with a Diophantine equation seems to go on forever

I tried to find a non-trivial integer solution to the equation $$2012^2=a^2+b^2+c^2+d^2+e^2$$ with Mathematica but the computation takes minutes; I might be doing something wrong. ...
7
votes
3answers
477 views

NDSolve and {C, K, Slot} and other built-ins as a variable name

The following problem is an exploration of what causes the error "Input is not an ordinary differential equation" in Mathematica as it seems to have changed from version 8 to version 9. Specifically ...
5
votes
4answers
1k views

How to get exact roots of this polynomial?

The equation $$ 64x^7 -112x^5 -8x^4 +56x^3 +8x^2 -7x - 1 = 0 $$ has seven solutions $x = 1$, $x = -\dfrac{1}{2}$ and $x = \cos \dfrac{2n\pi}{11}$, where $n$ runs from $1$ to $5$. With ...
4
votes
2answers
258 views

find where 3 inequalities are simultaneously greater than zero

I have 3 functions: f11[l], f12[l] and f13[l], and I would like to know for which values of ...
4
votes
4answers
2k views

Solving complex equations

I feel like I am missing a basic, but key point when using Mathematica's Solve or Reduce. ...