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
290 views

I can't get Compile to work

I've got some problems with my code, and I try to make it faster. Some of you suggested me to split my problem, and I'm here... I post the same function with and without Compile. This is a support ...
4
votes
2answers
218 views

How can I eliminate equivalent equations from a list?

I want to find the numbers $a$, $b$, $c$, $d$ of the plane $ax + by +cz +d = 0$ which make the distance from the point $M(1,2,3)$ to the plane equal to 2. I tried ...
3
votes
1answer
1k views

NSolve: Mathematica 9 issue

In Mathematica 8 the following expression evaluates and returns a result in terms of InverseFunction: ...
2
votes
2answers
303 views

How do I get the solutions of a cubic equation in trigonometric form?

I know $x^3-3 x+1=0$ has three roots that can be expressed in trigonometric form: $\{2\sin(10^\circ),\,-2\cos(20^\circ),\,2\cos(40^\circ)\}$. How can I get this result with Mathematica?
2
votes
1answer
2k views

Forcing FindRoot to return only real solutions

FindRoot documentation reports that if the equation and the initial point are reals, the solutions are searched in the real domain. However, in the following case I ...
2
votes
1answer
416 views

How can I solve an exponential inequality in Mathematica?

I would like to solve the equation: A Exp[m t + s Sqrt[t] x - 1/2 s^2 t] >= K with respect to x (which is in the exponent) ...
2
votes
1answer
130 views

What's the difference between the following two codes?

I have two codes to find the integer numbers $m$, $x$, $y$, $z$ in the system of equations. First code ...
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 ...
0
votes
1answer
165 views

Manipulate[]'ing complex roots of an equation using a 2D slider [closed]

I want to make a demonstration of how the complex roots of a polynomial change when I alter the coefficients. Here is my attempt: ...
8
votes
2answers
673 views

How to solve a system of equations of the Vietnamese Mathematical Olympiad?

This is a system of equations of the Vietnamese Mathematical Olympiad 2013, the first day. Solve the system of equations $$\begin{cases} \sqrt{\sin^2 x + \dfrac{1}{\sin^2 x}} + \sqrt{\cos^2 y + ...
2
votes
1answer
136 views

Using NSolve on an equation that involves Mean and TruncatedDistribution

What I would like to do is create a mixture distribution that has a specified mean by varying one parameter in the distribution. To do this I've written the following code; ...
4
votes
0answers
110 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 ...
6
votes
1answer
569 views

FindRoot options

I found an example of FindRoot usage that I couldn't find documented. It looks like: FindRoot[f[x] == 0.4, {x, 0, 1, 0, 1}] ...
0
votes
0answers
29 views

Handling “Solve was unable to solve the system with inexact coefficient” errors [duplicate]

Possible Duplicate: How to get rid of warnings when using Solve on an equation with inexact coefficients? I've been trying to calculate the following in Mathematica: ...
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
1answer
474 views

How do I use RSolve to solve a system of recurrence relations?

I am trying to solve a system of recurrence relations as follows. ...
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 ...
3
votes
1answer
760 views

Solve pair of recurrence relations

[Corrected equations and added simple example] Can you solve a system of (loosely) coupled recurrence relations like this in Mathematica somehow? ...
3
votes
1answer
1k views

Solving an Integral equation

I would like to solve the equation $$\frac{2}{p}\int_0^1((1-u)^{1-p}+u^{1-p})^{\frac{1}{p}}\text{d}u=42$$ for p numerically. I tried ...
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
4answers
1k views

How to find the sum all even numbers of this sequence?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first $20$ terms of this sequence ...
0
votes
1answer
232 views

How to express endogenous variables in terms of exogenous variables?

I have 11 endogenous variables (RD, NR, WR, Q, NQ, R, L, W, NU, C1, C2) and two exogenous variables (EE, K). I'm trying to find $RD = f(EE, K),\, NR = f(EE, K),\, ...,\, C2 = f(EE, K)$. Hence, I ...
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?
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: ...
2
votes
0answers
261 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 ...
11
votes
3answers
3k 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 ...
3
votes
3answers
632 views

Solving Integrals

Here's a problem that I don't understand. f[x_] := Exp[Cos[3*x]] g[x_] := (1/3)*x^3 - x^2 + 2 When I try to find the limit: ...
2
votes
0answers
97 views

Why cant Mathematica solve this equation? [duplicate]

Possible Duplicate: Can Reduce *really* not solve for x here? Why cant Mathematica solve this equation? ...
1
vote
1answer
336 views

How to extract Solve results as variables [duplicate]

Possible Duplicate: Assign the results from a Solve to variable(s) In the following example: ...
4
votes
1answer
208 views

How to solve this trigonometric system of equations numerically?

How can the following trigonometric system of equations be solved numerically? ...
0
votes
1answer
205 views

Solve not satisfying simple boundary conditions

I am trying to solve the following equations for the coefficients c1 and c2. ...
2
votes
0answers
367 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, ...
5
votes
1answer
330 views

Using external variable as a variable inside WhenEvent & NDSolve

I'm trying to use the new WhenEvent functionality of NDSolve in Mathematica 9, in order to perform an action when a variable in the system reaches a certain value. I would like this variable to come ...
3
votes
1answer
290 views

Find asymptotics of a function

Can Mathematica find the asymptotics of a function in the following sense? I have Log[1/n^2]/Log[4^(-Sqrt[Log[n]]) + (2^(-Sqrt[Log[n]]) - 1)^2] and I would like ...
1
vote
1answer
86 views

How to get a solution involving logs in the right form?

How do I get Solve[(1/9)^(r/2) == 1/n , r] to give me Log[n]/Log[3] and not ...
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 ...
5
votes
2answers
271 views

How to solve this combination equation?

I want to solve the equation $$ 2n\cdot\binom{n}{0} + 5(n-1)\binom{n}{1}+13(n-2)\binom{n}{2}+\cdots + \left(2^{n-1} + 3^{n-1}\right)\binom{n}{n-1} = 1685. $$ or using alternative notion for binomial ...
1
vote
1answer
662 views

How can I understand the result Mathematica returns from DSolve?

I have solved an ODE using DSolve, but I have a problem with understanding the solution. In general the solution is in the form: ...
4
votes
1answer
330 views

Eliminating functions from system of PDE in Mathematica

Mathematica users, Let's see an example of three PDEs: How can I eliminate variables q1[x,y,z] and q2[x,y,z] from a system of ...
0
votes
2answers
163 views

How to use Solve rules as a function body?

Solve gives me an expression which I want to use as the body of a function. Rather than run Solve every time inside my function ...
2
votes
2answers
425 views
1
vote
1answer
172 views

Remove failed Solve[] attempts

I can't figure how to replace a failed evaluation with a null value. I am very new to Mathematica. I have an equation that are being processed using the Solve[] ...
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 ...
3
votes
3answers
632 views

How can I solve Tan[t] - t == F[x] for t as a function of x?

How can I solve the equation Tan[t] - t = Ax, where A is a constant for t[x]? I know that ...
13
votes
2answers
367 views

Is there a way to use functions like Prime[n] within Solve[]?

I'm trying to see if a number can be written as the sum of two prime numbers. Ideally, I would like to use Solve[ Prime[n] + Prime[m] == 100, {n, m}] But that ...
3
votes
0answers
141 views

RSolve not returning known solution

I have the following recurrence relationship for which I know the solution is given by a binomial distribution: ...
1
vote
1answer
191 views
0
votes
1answer
143 views

Industrial Level Applications. Recipe for mixed notation of equations set

I am working with large (linear) equations set within Mathematica in numerical notation. For example, set from 4056 eq. is solved for a second, no more. There is no doubt, result is great. But even ...
1
vote
1answer
413 views

Comparing two symbolic expressions

Does Mathematica provide any way to compare two symbolic expressions and find which is the greatest? For example, I want to find which is the greatest of ...
1
vote
2answers
1k views

Tricks for solving (lots of) coupled nonlinear equations numerically?

I have a system of 6 non-linear (quadratic) coupled equations with 6 complex unknowns \begin{align*} |x_1|^2 + |x_2|^2 + |x_3|^2 &= a\\ x_1 x_4^* + x_3 x_5^* &= b + c i\\ x_1 ...