Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Solve Calculator

Solve

Function: solve (<expr>, <x>)

g:y=root((t^2)*(1-((x^2)/(b^2))));
h:y=x;
solve([g,h],x);

Function: solve (<expr>)

Function: solve ([<eqn_1>, ..., <eqn_n>], [<x_1>, ..., <x_n>]) Solves the algebraic equation <expr> for the variable <x> and returns a list of solution equations in <x>. If <expr> is not an equation, the equation <expr> = 0 is assumed in its place. <x> may be a function (e.g. f(x)), or other non-atomic expression except a sum or product. <x> may be omitted if <expr> contains only one variable. <expr> may be a rational expression, and may contain trigonometric functions, exponentials, etc.

The following method is used:

Let <E> be the expression and <X> be the variable. If <E> is linear in <X> then it is trivially solved for <X>. Otherwise if <E> is of the form A*X^N + B then the result is (-B/A)^1/N) times the Nth roots of unity.

If <E> is not linear in <X> then the gcd of the exponents of <X> in <E> (say <N>) is divided into the exponents and the multiplicity of the roots is multiplied by <N>. Then solve is called again on the result. If <E> factors then solve is called on each of the factors. Finally solve will use the quadratic, cubic, or quartic formulas where necessary.

In the case where <E> is a polynomial in some function of the variable to be solved for, say F(X), then it is first solved for F(X) (call the result <C>), then the equation F(X)=C can be solved for <X> provided the inverse of the function <F> is known.

breakup if false will cause solve to express the solutions of cubic or quartic equations as single expressions rather than as made up of several common subexpressions which is the default.

multiplicities - will be set to a list of the multiplicities of the individual solutions returned by solve, realroots, or allroots. Try apropos (solve) for the switches which affect solve. describe may then by used on the individual switch names if their purpose is not clear.

solve ([<eqn_1>, ..., <eqn_n>], [<x_1>, ..., <x_n>]) solves a system of simultaneous (linear or non-linear) polynomial equations by calling linsolve or algsys and returns a list of the solution lists in the variables. In the case of linsolve this list would contain a single list of solutions. It takes two lists as arguments. The first list represents the equations to be solved; the second list is a list of the unknowns to be determined. If the total number of variables in the equations is equal to the number of equations, the second argument-list may be omitted.

When programmode is false, solve displays solutions with intermediate expression (%t) labels, and returns the list of labels.

When globalsolve is true and the problem is to solve two or more linear equations, each solved-for variable is bound to its value in the solution of the equations.

Examples:

          (%i1) solve (asin (cos (3*x))*(f(x) - 1), x);

SOLVE is using arc-trig functions to get a solution. Some solutions will be lost. %pi

          (%o1)                  [x = ---, f(x) = 1]
                                       6
          (%i2) ev (solve (5^f(x) = 125, f(x)), solveradcan);
                                          log(125)
          (%o2)                   [f(x) = --------]
                                           log(5)
          (%i3) [4*x^2 - y^2 = 12, x*y - x = 2];
                                2    2
          (%o3)             [4 x  - y  = 12, x y - x = 2]
          (%i4) solve (%, [x, y]);
          (%o4) [[x = 2, y = 2], [x = .5202594388652008 %i

- .1331240357358706, y = .0767837852378778

- 3.608003221870287 %i], [x = - .5202594388652008 %i

- .1331240357358706, y = 3.608003221870287 %i

+ .0767837852378778], [x = - 1.733751846381093,

          y = - .1535675710019696]]
          (%i5) solve (1 + a*x + x^3, x);
                                                 3
                        sqrt(3) %i   1   sqrt(4 a  + 27)   1 1/3
          (%o5) [x = (- ---------- - -) (--------------- - -)
                            2        2      6 sqrt(3)      2

sqrt(3) %i 1 (---------- - -) a 2 2 - --------------------------, x = 3 sqrt(4 a + 27) 1 1/3 3 (--------------- - -) 6 sqrt(3) 2

3 sqrt(3) %i 1 sqrt(4 a + 27) 1 1/3 (---------- - -) (--------------- - -) 2 2 6 sqrt(3) 2

sqrt(3) %i 1 (- ---------- - -) a 2 2 - --------------------------, x = 3 sqrt(4 a + 27) 1 1/3 3 (--------------- - -) 6 sqrt(3) 2

3 sqrt(4 a + 27) 1 1/3 a (--------------- - -) - --------------------------] 6 sqrt(3) 2 3 sqrt(4 a + 27) 1 1/3 3 (--------------- - -) 6 sqrt(3) 2

          (%i6) solve (x^3 - 1);
                       sqrt(3) %i - 1        sqrt(3) %i + 1
          (%o6)   [x = --------------, x = - --------------, x = 1]
                             2                     2
          (%i7) solve (x^6 - 1);
                     sqrt(3) %i + 1      sqrt(3) %i - 1
          (%o7) [x = --------------, x = --------------, x = - 1,
                           2                   2

sqrt(3) %i + 1 sqrt(3) %i - 1 x = - --------------, x = - --------------, x = 1] 2 2

          (%i8) ev (x^6 - 1, %[1]);
                                                6
                                (sqrt(3) %i + 1)
          (%o8)                 ----------------- - 1
                                       64
          (%i9) expand (%);
          (%o9)                           0
          (%i10) x^2 - 1;
                                        2
          (%o10)                       x  - 1
          (%i11) solve (%, x);
          (%o11)                  [x = - 1, x = 1]
          (%i12) ev (%th(2), %[1]);
          (%o12)                          0

There are also some inexact matches for solve. Try ?? solve to see them.

(%o1)                                true
(%i2) 

Solve Example

Related Examples

solve

solve([a+m+q=0, a=m-q...

Calculate

solve

eq1:(-2*D+L+d1+d2+d3)...

solve([eq1],[d1]);

E(d2,d3):=d2^2+d3^2;

Calculate

solve

solve([3*x+2*y=12,-2*...

Calculate

solve

f1:zd/(zt-7*25.4)=1.5;

f2:zd/(zt-10*25.4)=1.8;

solve([f1,f2],[zd,zt]);

Calculate

solve

solve((5/12)-(7/8)+(2...

Calculate

solve

eq2: x1^2*v1^2 - 2 * ...

res2 = solve([eq2], [...

res2(1);

Calculate

solve

f:x^3+x^2-5*x+3;

g:%e^(-x)-2;

solve(g,x);

Calculate

solve

a:x=x^x;

solve(a:x);

Calculate

solve

z1/(z1+s)=0.25;

z2/(z2+s)=0.4;

(z1+z2)/(z1+z2+s)=x;

Calculate

solve

y:1/x-x=0;

solve(y,x);

Calculate