I Algebra
Usage Overview
Functions | Brief Usage Descriptions and Examples |
---|---|
epd,fac,fra | Simplify, expand, factor, and compare expressions. Write a decimal as a fraction (rational number). Expand an expression by "epd;expr", factor an expression by "fac;expr", and convert a decimal to a fraction by "fra; decimal". Examples 4/(2/3)+(5/8)*(7/5) || 5^(2/3)>6^(1/2) || epd;(3^(1/2)-2^(1/2))^2 || epd((x+2)^4) || fac;x^2-x-2 || fra;0.125 || fra(0.685) || (2-3*I)*(3+5*I) || abs(6+8*I) ||. |
slv | Solve an equation f(x) = 0 and inequality f(x) > g(x) by "slv;f(x);x" or "slv;f(x)>g(x);x". Examples slv;a^2-8*a-3;a || slv;z^2+2*z+3;z;C || slv(x^2-3*x+2>0,x) ||. |
eqs | Solve a system of linear or nonlinear equations, e.g., f(x,y) = 0 and g(x,y) = 0 by "eqs;f(x,y),g(x,y);x;y", where "x;y" is optional if no other variables involved. Examples eqs;2*x-3*y;x+y-5 || eqs;u-5*v+w-3;4*v-3*u+6*w-1;u-v+w-2 || eqs;x^2-y^2-2*x+y-5;x-y+4 || eqs;x-a*y+3;b-x+y-2;x;y ||. |
pln | Plot points, lines, polygons on a coordinate plane. Choose options "pt", "ln", "pg" for points, lines, and polygons. Examples pln;pt=(2,4) || pln;pt=[(0,3),(4,0)] || pln;ln=[(-5,-3),(2,8)] || pln;ln=[(2,1),(2,-5)] || pln;ln=[(3,4),(-3,4)] || pln;ln=[(3,-5),(-3,5)];ln=[(-4,6),(5,8)] || pln;pg=[(0,0),(2,6),(-4,-3)] || pln;pg=[(-3,3),(-3,-3),(3,-3),(3,3)] ||. |
plt | Plot one-variable function graphs by "plt;f(x)". Choose additional options "pt" and "itv" for points and intervals for graphs. Examples plt;2-x**2 || plt;0.5*x || plt;-2*x;x**2-4 || plt;x**(1/2);x**2;(-x)**(1/2) || plt;x**2/2-3*x+5;3-x;pt=(2,1) || plt;3*sin(2*x-1)/2;itv=(-3.14,3.14) ||. |
Table of Contents
1 Numbers
Real numbers and their subsets
On a number line, every point represents a real number, and the origin corresponds to 0.
(1) Natural numbers or positive integers N = { 1, 2, 3, 4, 5, 6, \(\cdots\)}.
(2) Whole numbers or nonnegative integers {0, 1, 2, 3 ,4 5, 6,
\(\cdots\)}.
(3) Integers Z = {0, ±1, ±2, ±3, ±4, ±5, ±6, \(\cdots\) }.
(4) Rational numbers are represented by a fraction \(\frac{m}{n}\)
for both \(n≠0\) and \(m\) integers.
(5) Irrational numbers are numbers that are not rational such as \(π,\sqrt{3}, e,\ln(2)\),
\(\sin(1),\cosh(3),4^{π}\).
Convert a Decimal to a Fraction: [ fra; decimal ], [ fra(decimal) ]
To convert a decimal number to a fraction, place the decimal number over its place value and then write the result in simplest form. For example, 0.24 is in the hundredth place, thus 0.24 \(=\frac{24}{100}=\frac{6}{25}\). Similarly, 1.6 \(=\frac{16}{10}=\frac{8}{5}\). Check fra;0.24 || fra;1.6 ||.
Use "fra;decimal" or "fra(decial)" to convert a decimal (rational number) to a fraction.
Decimals Real numbers can be expressed as decimals. Rational numbers have finite or repeating decimal expansions such as \(\frac{1}{8}=0.125,\frac{2}{3}=0.\bar6\) and \(\frac{3}{7}=0.\overline{428571}\). Irrational numbers have infinite non-repeating decimal expansions such as \(π = 3.14159265359\cdots,e=2.7182818\cdots, \sqrt{3}=1.7320508\cdots\). Every finite decimal is equivalent to an infinite decimal where digit 0 or 9 repeats like \(2 = 2.\bar0 = 1.\bar9,\frac{5}{8}=0.625\bar0 = 0.624\bar9\).
Examples Each example is separated by "||".
(1) Enter a fraction by '/' like 1/2 || 23/45 || 90/17 || 1.2/3 || -3.6/8.1 ||.
(2) To get the decimal value of a fraction 3/5, enter 3.0/5 || 3/5.0 ||. Both return 0.6.
(3) For a mixed fraction
\(2\frac{3}{7}\), convert it to an improper fraction \(\frac{17}{7}\) and by 17/7 ||, or 17.0/7 || for a decimal number.
Attention Write 'pi' for \(π\); 'E', 'e', or 'exp(1)' for \(e\) = 2.7182818\(\cdots\).
Examples Check 2+3/7 || 4/(8/5)+11/9 || 12/21-15/21 || (2/3)*(18/7)+4*(26/24) || 6^(1/2) || 3^0.75 || 3^(-4) || 2-3*sin(pi) || 4+5*log(e) || 2.0/(7/16) || pi^(3/2) || 1-exp(1/3) || 0.5+pi^0.4 || (2/7)*exp(-0.3) || fra;0.333 || fra;0.1478 || fra(2.547) || fra(3.269) ||.
Order properties Real numbers are ordered, which implies if \(x\) and \(y\) are real numbers, then either \(x≤y\)
or \(x > y\).
(1) \(x≥y⇔x-y ≥0\).
(2) If \(x < y\) and \(y < z\), then \(x<z\).
(3) If \(x<y\), then \(x+z <y+z\).
(4) If \(x < y\) and \(z>0\), then \(xz < yz\).
(5) If \(0 < x < y\),
then \(\frac{1}{x} > \frac{1}{y}\).
(6) If \(c > 0\), then \(x < x+c\) for all \(x\).
Examples Determine whether a relation is True or False using ">" (greater than) or "==" (equal).
(1) Type x+5>x ||, and it returns True
because \(x+5>x\) for all \(x\).
(2) Type x-8>x ||, and it returns False.
(3) 67/68>87/88 || -7/8>-9/10
|| x-a>x || 2^(1/2)>3^(1/2) || exp(3)>pi^2 || 1/3>0.33333 || 1/3>2/7 || 7/18>4/9 || x-5>x || 3.0/4==0.75 || 11/4==11.0/4 || 2==8^(1/3) ||
0.3^3>0.4^3 || 0.5^(-3)>0.4^(-3) || 25^(-3)>28^(-3) || exp(-2)>exp(-3) || 2-78/79>2-88/89 || -11>-18 || (-67)^(1/3)>(-53)^(1/3) ||.
Attention Notice that 5==5.0 || returns False because of the difference in decimals.
Arithmetic properties
(1) Commutative: \(x+y=y+x\) and \(xy=yx\).
(2) Associative: \(x+(y+z)=(x+z)+y\)
and \(x(yz)=(xy)z\).
(3) Distributive: \(x(y+z)=xy+xz\).
(4) Identity: \(x+0=x\) and \(x·1=x\).
(5) Inverse: \(x + (-x) = 0\)
and \(x·\frac{1}{x}=1, x≠0\).
Every real number \(x\) has an additive inverse or opposite \(-x\), and a multiplicative inverse or reciprocal \(\frac{1}{x}=x^{-1}\) for \(x≠ 0\). Thus, subtraction can be viewed as adding an inverse of a number \(x-y=x + (-y)\), and division as multiplying an inverse of a number \(x\div y=\frac{x}{y}=x·\frac{1}{y}=x·y^{-1}\).
Examples Verify these properties by 234*567==567*234 || 7*a==a*7 || 634*(78-d)==634*78-634*d || x+y==y+x || a*b==b*a || x==-(-x) || a+b+c==c+a+b || a*(b*c)==c*(b*a) || x^(-1)==1/x || a*(b-3)==a*b-3*a ||.
Floor, ceiling, sign, and absolute values Use the function names "floor", "ceiling", "sign", and "abs" to obtain the greatest integer, the least integer, sign, and absolute value of a number, respectively.
Examples floor(0.3) || ceiling(2.7) || sign(-4) || abs(-8) || floor(-5.6)+3 || ceiling(-3.8)-7 || sign(-7) || sign((-8)^(1/3)) || sign(0) || sign(--1) ||.
Complex numbers: [a + b*I], [abs(a + b*I)]
A complex number is any number of the form \(a + bi\), where \(a\) and \(b\) are real numbers, and \(i\) represents the imaginary unit satisfying \(i^2 = -1\). The absolute value (or modulus or magnitude) of a complex number \(z=a+bi\) is \(|z| = \sqrt{a^2+b^2}\). We denote the set of all complex numbers by C = {\(a+bi|a,b∈R\)}. A complex number \(z=a+bi\) is usually represented by the point (\(a,b)\) in the complex plane where the horizontal axis represents the real part and the vertical axis the imaginary part.
Examples Write a complex number a+b*I ||, where the upper case I represents for the imaginary unit. Also notice that the output of the
imaginary unit is not the upper case 'I' but the lower case 'i', so 1+2*I || returns 1 + 2i.
(1) Type abs(a+b*I) || to calculate its absolute value.
(2) Check 2+3*I || I*I || i*i || i*I || I^3 || I^20 || I^35 || 3+7*I || (2+3*I)*(4-9*I) || (2-5*I)/(3+7*I) || (4-7*I)^4 || abs(2+5*I) || abs(-8*I) || abs(-6) || abs(9*I-7) || abs(3+4*I) || abs(1-6*I) ||.
Examples Check identities \(e^{iπ}=-1, e^{i\theta}=\cos\theta+i\sin\theta\) and \((\cos\theta+i\sin\theta)^n=\cos(n\theta)+i\sin(n\theta)\)\(=e^{nit}\) by exp(I*pi) || cos(t)+I*sin(t) || (cos(t)+I*sin(t))^2 || (cos(t)+I*sin(t))^6 || (cos(t)+I*sin(t))^9 || (cos(t)+I*sin(t))^n ||. This formula is often useful for simplifying expressions involving complex numbers.
Any complex number \(z=a+bi\) can be written as a polar form \(z=re^{iθ}=r(\cos θ + i\sin θ)\) for some positive number \(r\) and angle \(θ\), where \(r=\sqrt{a^2+b^2}=|z|\) and \(\tan θ = \frac{b}{a}\) for \(a ≠0\).
Complex conjugate Let \(z=a+bi\). Then \(z̄=a-bi\) is called the conjugate of \(z\). Note these relations \(z + z̄ = 2a,|z_1z_2|=|z_1||z_2|\), \(|z|=|\bar z|,\bar{\bar z}=z,z·z̄= a^2+b^2=|z|^2=|z̄|^2,z^{-1}=\frac{\bar z}{|z|^2}\) for \(z≠0\). If \(z=\bar z⇒z∈R\) or \(b=0\). In addition, \(\overline{z^n}=(\bar z)^n, e^{\bar z}=\overline{e^z}\), and \(\ln \bar z= \overline{\ln z}\).
Examples (a+b*I)+(a-b*I) || (a+b*I)-(a-b*I) || (a+b*I)*(a-b*I) || (2+3*I)*(2-3*I) || abs(4-7*I)^2-abs(4+7*I)^2 || 1/(6-9*I)-(6+9*I)/abs(6-9*I)^2 || (1/(2+3*I) || (2+5*I)^4 || (2-5*I)^4 || (3-7*I)^5 || (3+7*I)^5 || abs(1+2*I)^2-abs(1-2*I)^2 || abs(10*I)^2-abs(-10*I)^2 ||.
For two complex numbers, conjugation is distributive over addition, subtraction, multiplication and division. This means that \(\overline{z+u}=\bar z+\bar u,\overline{z-u}=\bar z-\bar u,\overline{z·u}=\bar z·\bar u, \overline{(\frac{z}{u})}=\frac{\bar z}{\bar u}\) for \(u≠0\).
Examples a+b*I+c+d*I || a-b*I+c-d*I || 1-2*I+3+8*I || 1+2*I+3-8*I || epd;(a+b*I)*(c+d*I) || epd;(a-b*I)*(c-d*I) || abs((4-7*I)*(2+5*I))-abs((4+7*I)*(2-5*I)) || abs((1+5*I)/(2-4*I))-abs((1-5*I)/(2+4*I)) ||.
2 Algebraic Expressions
Simplify an expression: [ expr ]
Algebraic expressions involve variables, constants, and arithmetic operators.
Examples 2*(-64)^(1/3) || 0.5*exp(-2) || 2/3+6^0.5 || cos(pi)-2*cos(0) || log(1)+27^(-2/3) || tan(pi/4)+sec(pi)/3 || (1+sqrt(2)/2)^2 || sin(acos(-1)) || sinh(log(2.0)) || x*x^(-3) || sin(z)^2+cos(z)^2 || log(exp(2*x))+log(E) || floor(-3.5) || ceiling(7.8) || floor(x+1) || abs(-4)+5 || abs(-3+4*I) || I^2+I^4 || asinh(2.0) || 36*pi/180 || gamma(5) ||.
Laws of arithmetic operations
addition and subtraction a + 0 = a, 0 - a = -a, -(-a) = a, -(a - b) = -a + b, -(a+b) = -a - b
multiplication and division \(a·0=0, 0÷a=\frac{0}{a}=0,a≠0, a÷a=1, b÷a=\frac{b}{a},a≠0\)
fraction \(\frac{a}{-b}=\frac{-a}{b}=-\frac{a}{b}, \frac{a}{b}\pm\frac{c}{b}=\frac{a\pm c}{b}, \frac{a}{b}+\frac{c}{d}=\frac{ad+cb}{bd}, \frac{a}{b}-\frac{c}{d}=\frac{ad-cb}{bd}, \frac{a}{b}·\frac{c}{d}=\frac{ac}{bd}\),
\(a×\frac{c}{b}=\frac{ac}{b}, \frac{a}{b}÷\frac{c}{d}= \frac{a}{b}×\frac{d}{c}=\frac{ad}{bc}, 1÷\frac{1}{a}=1×\frac{a}{1}=a, b÷\frac{1}{a}=\frac{b}{\frac{1}{a}}=a×\frac{a}{1}=ab\),
\(a÷\frac{c}{b}=a×\frac{b}{c}=\frac{ab}{c}, \frac{a}{b}÷c=\frac{a}{b}×\frac{1}{c}=\frac{a}{bc}\)
power \(a^0=1,a≠0, 0^a=0,a>0, a×a=a^2\)
distributive c(a - b) = ca - cb, c(a + b) = ca + cb
Examples Verify some of these operations by 2/3+3/4 || 1/2-3/5 || (a/b)*(c/d) || (a/b)/(c/d) || (-a)/(-b) || (7/5)/(2/3) || (2/5)*(7/9) || 2-3/4 || 3+3/7 || (5/8)*(3-7/6) || (a/b)*(2-c/d) || a/(c/b) || 2-17/50 || 8/25+(35/99)*10 || -(-a) ||.
Laws of exponents \(x^mx^n=x^{m+n}, \frac{x^m}{x^n}=x^{m-n}, (x^m)^n=x^{mn}, x^{-n}=\frac{1}{x^n}, (xy)^n=x^ny^n\),
\( (\frac{x}{y})^n=\frac{x^n}{y^n}, x^{\frac{1}{n}}=\sqrt[n]{x}, x^{\frac{m}{n}}=\sqrt[n]{x^m}=(\sqrt[n]{x})^m, \sqrt[n]{xy}=\sqrt[n]{x}\sqrt[n]{y}, \sqrt[n]{\frac{x}{y}}=\frac{\sqrt[n]{x}}{\sqrt[n]{y}}\),
\(\sqrt[n]{\sqrt[m]{x}}=\sqrt[nm]{x}=(x^{\frac{1}{m}})^{\frac{1}{n}}, \sqrt[n]{(\sqrt[q]{x^p})^m}=\sqrt[n]{(x^{\frac{p}{q}})^m}=(x^{\frac{pm}{q}})^{\frac{1}{n}}=x^{\frac{pm}{qn}}\).
Examples x^m*x^n || exp(3)*exp(-5) || cot(x)^2*tan(x)^3 || (x^m)^n || (x^(-2))^3 || (y^(2/3))^(9/7) || (3*z)^(-5) || (a*b)^7 || (a^2*b^3)^(-5) || (x/y)^2 || (x^2/y)^(-3) || x^(1/2) || (x/y^3)^(1/2) || (y^(2/3))^(3/5) || (x^(1/2))^(1/3) || ((x^(2/3))^2)^(7/5) || ((5^(2/3))^2)^(7/5) || ((3.2^(2/3))^2)^(7/5) || (-64)^(2/3) || 125^(-2/3) || x^0.5*x^(-2) || (x-x^0.5)*(x+x^0.5) || (a*b^2-a)/(a*(b-1)) || (b^(2/3)-b^2)/b^2 || (y+y^0.5)/y^0.5 ||.
Operation with general functions f(x) The general function expressions f(x) or g(x) can be mixed in an operation with other particular functions and expressions. For example, f(x) + 3f(x) = 4f(x).
Examples 2*(f(x)+g(x)) || (f(x)-2*g(x))^2 || f(x)-f(-x) || f(x)/g(x)+2/g(x) || f(x)*g(x)-f(x)^2 ||.
Factor an expression: [ fac;expr], [ fac(expr) ]
Use "fac;expr" or "fac(expr)" to factor an expression.
Basic formulas The following formulas are frequently used for factoring.
\(a^2-b^2=(a+b)(a-b), a^3-b^3=(a-b)(a^2+ab+b^2, a^3+b^3=(a+b)(a^2-ab+b^2),\)
\(a^4-b^4=(a^2-b^2)(a^2+b^2)=(a-b)(a+b)(a^2+b^2)=(a-b)(a^3+ab^2+a^2b+b^3)\). In general, for any positive integer \(n≥2,a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+a^{n-3}b^2+\cdots+ab^{n-2}+b^{n-1})\). Formulas for completing the square \(a^2+2ab+b^2=(a+b)^2, a^2-2ab+b^2=(a-b)^2\). For example, factor \(x^3-3xy+2x^2=x(x^2-3y+x),z^3-z^2=2^2(z-1),u^3-16u=u(u^2-16)\)\(=u(u+4)(u-4)\).
Examples fac;x^2+x || fac;a^2-1 || fac;b^3+8 || fac;x^2-y^2 || fac;y^2-1 || fac;a^4-16 || fac;b^3-8 || fac;c^3+27 || fac;x^5-y^5 || fac;x^4-1 || fac;a^4-b^4 || fac;x^3-3*x*y+2*x^2 || fac;z^3-z^2 || fac;u^3-16*u || fac;2*f(x)-f(x)*g(y) || fac;g(x)^2-g(x) ||.
Expand an expression: [ epd; expr ], [ epd(expr) ]
Use "epd;expr" or "epd(expr)" to expand an expression.
Binomial expansion Useful formulas for expansion: \((a+b)^2=a^2+2ab+b^2, (a-b)^2=a^2-2ab+b^2,\)
\((a+b)^3=a^3+3a^2b+3ab^2+b^3, (a-b)^3=a^3-3a^2b+3ab^2-b^3\). In general, for any positive integer \(n\) \((a+b)^n=a^n+na^{n-1}b+\frac{n(n-1)}{1· 2}a^{n-2}b^2+ \frac{n(n-1)(n-2)}{1\cdot 2· 3}a^{n-3}b^3+\cdots+nab^{n-1}+b^n\)\(=\displaystyle\sum_{k=0}^nC_k^na^{n-k}b^k\), where \(C_k^n=\frac{P_k^n}{P_k^k}=\frac{n!}{k!(n-k)!}=\frac{n(n-1)(n-2)\cdots (n-k+1)}{1·2\cdot 3\cdots (k-1)k}\).
Examples epd;x*(x-1) || epd;(a+b)^2 || epd;(a-b)^2 || epd;(a+b)^3 || epd;(a-b)^3 || epd;(a-1)^4 || epd;(x+y)*(x^2-x*y+y^2) || epd;(u+v)*(u-v) || epd;(a^2+b^2)*(a^2-b^2) || epd;(x^(1/2)+h^(1/2))^2 || epd;(3*f(x)-2)^2 || epd;(f(x)-2*g(y))^3 || epd;(u(x)-3*x)^4 ||.
Special forms \((a+b)(a-b)=a^2-b^2,(a+b)(a^2-ab+b^2)=a^3+b^3,(a-b)(a^2+ab+b^2)=a^3-b^3\).
Examples epd;(a+b)*(a-b) || epd;(x+y)*(x^2-x*y+y^2) || epd;(u-v)*(u^2+u*v+v^2) || epd;(b-2)*(b+2) || (3^(1/2)+2^(1/2))*(3^(1/2)-2^(1/2)) || epd;(a+1)*(a^2-a+1) || epd;(b-3)*(b^2+3*b+9) || epd;(2*a+3*b)*(2*a-3*b) || epd;(3*x-2)*(9*x^2+6*x+4) || epd;(x^2+y^2)*(x^2-y^2) || epd;(a^3+b^3)*(a^3-b^3) || epd;(a^(1/2)-b^(1/2))*(a^(1/2)+b^(1/2)) || epd;(a+b*I)*(a-b*I) || epd;(x+y)^2-x^2 || epd;(2^0.5-3^0.5)^4 || epd;(x-z)^5*(x+z)^2 || epd;(x+y)^3-x^3+y^2 || epd;(x-a)^2-(x+a)^2 || epd;(a+b)^3+(a-b)^3 ||.
Permutations and Combinations The number of permutations of \(n\) distinct elements is \(n\) factorial (\(n!\)), the product of all positive integers less than or equal to \(n\). In elementary combinatorics, the k-permutations (or partial permutations), denoted as \(P_k^n\), are the ordered arrangements of \(k\) distinct elements selected from a set of \(n\) elements, and \(P_k^n=\frac{n!}{(n-k)!}\) for \(k≤n\) and is 0 for \(k> n\). It follows \(P_n^n=\frac{n!}{0!}=n!\) and 0! = 1! = 1. Use gamma function to compute factorials and k-permutations by \(Γ(n+1)=n!\). Note that the domain of \(Γ(x)\) is all positive numbers or \(x>0\).
Examples Calculate \(P_3^7=\frac{7!}{4!}\) by gamma(8)/gamma(5) ||, \(P_8^8=\frac{9!}{1!}\) by gamma(9)/gamma(1) ||, and \(P_{4}^{54}\) by gamma(55)/gamma(51) ||.
A combination is a selection of items from a set such that the order of selection does not matter. If the set has \(n\) elements, the number of k-combinations \((_k^n)=C_k^n=\frac{n!}{k!·(n-k)!}=\frac{n(n-1)(n-2)\cdots (n-k+1)}{1·2\cdot 3\cdots (k-1)k}\) is equal to the binomial coefficient for \(k≤n\) and is 0 for \(k>n\). The formula for \((_k^n)\) is written in terms of factorials and can be calculated by gamma function for \(Γ(n+1)=n!\).
Examples Calculate \((_4^9)=\frac{9!}{4!·5!}\) by gamma(10)/(gamma(5)*gamma(6)) ||. The number of 5-card hands possible from a standard 52-card deck is \((_5^{52})=\frac{52!}{5!·47!}\) and can be calculated by gamma(53)/(gamma(6)*gamma(48)) ||, which is 2598960. Calculate \((_{10}^{20})\) by gamma(21)/(gamma(11)*gamma(11)) ||. Calculate \((_{32}^{32})\) by gamma(33)/(gamma(33)*gamma(1)) ||.
Absolute values: [ abs(expr) ]
An absolute value \(|x|\) represents the distance from a point \(x\) to the origin on the number line, \(|x - y|\) is the distance between points \(x\) and y, and \(|x|=\begin{cases}x x≥0\\-x x< 0\end{cases}\), \(|f(x)|=\begin{cases}f(x) f(x)≥0\\-f(x) f(x)< 0\end{cases}\), \(|x-y|=\begin{cases}x-y x≥ y\\y-x x< y\end{cases}\). Distance and absolute value are nonnegative.
Examples
(1) The distance from 2 to 0 is the same as that from -2 to 0, or |-2| = |2|.
(2) The distance between 6 and 9 is
the same as that between 0 and 3. So |9 - 6| = |6 - 9| = |3 - 0| = |0 - 3|.
(3) Solve |a| = -a. The number a must be a ≤ 0.
(4) Solve |u - 7| = 7 - u. The number u - 7 ≤ 0 ⇒ u ≤ 7.
(5) Solve |2b - 5| = 5 - 2b ⇒ 2b - 5 ≤ 0 ⇒ 2b ≤ 5
⇒ b ≤ \(\frac{5}{2}\).
(6) Solve |3z + 8| = 8 + 3z ⇒ 3z + 8 > 0 ⇒ z > -\(\frac{8}{3}\).
Examples Enter the function name "abs" followed by an expression. || abs(-5) || abs(6.8) || abs(2)-abs(-2) || abs(9-6) || abs(6-9) || abs(0-3) || abs(-6-(-9)) || abs(-x) || abs(-x)-abs(x) || abs(-2) || Abs(-3.5) || abs(-a-b) || -abs(-x) || -abs(-7.8) || abs(-x)^2 || slv;abs(a)+a;a || slv;abs(u-7)-(7-u);u || slv;abs(2*b-5)-(5-2*b);b || slv;abs(3*z+8)-(3*z+8);z ||.
Properties of absolute values
(1) \(|-a|=|a|=\sqrt{a^2}\)
(2) \(|ab|=|a|·|b|\)
(3) \(|\frac{a}{b}|=\frac{|a|}{|b|}, b≠ 0\)
(4) Triangle inequality \(|a\pm b|≤ |a|+|b|\) or \(|a-b|≥||a|-|b||≥|a|-|b|\)
or \(|a-b| ≥|b|-|a|\). Since \(|a\pm b|^2=(a\pm b)^2=a^2\pm 2ab+b^2≤ |a|^2+2|a||b|+|b|^2\)\(=(|a|+|b|)^2\), take square root to get the result.
Absolute value equations and inequalities For all \(r≠0\), \(-|r| < r < |r|\)
\(|x|=r⇔ x=\pm r⇔\) either \(x=r\) or \(x=-r\)
\(|x| < r ⇔ -r< x < r ⇔ x∈\) (\(-r, r\)), an open interval symmetric about center/midpoint 0
\(|x|≤ r⇔ -r ≤ x≤ r⇔ x∈\) [\(-r,r\)], a closed interval symmetric about center/midpoint 0
\(|x|>r⇔\) either \( x>r\) or \(x<-r⇔ x∈\) (\(r,∞\)) ∪ (\(-∞, -r\))
\(|x|≥ r⇔\) either \( x≥ r\) or \(x≤ -r⇔ x∈\) [\(r,∞\)) ∪ (\(-∞, -r\)]
\(|x-c|=r⇔ x=c\pm r⇔\) either \(x=c+r\) or \(x=c-r\)
\(|x-c|≤ r⇔ c-r≤ x ≤ c+r⇔ x∈\) [\(c-r, c+r\)], symmetric about center/midpoint \(c\)
\(|x-c|≥ r⇔\) either \(x≥ c+r\) or \(x ≤ c-r⇔ x∈\) [\(c+r,∞\)) ∪ (\(-∞, c-r\)]
\(|x+c|=r⇔ x=-c\pm r⇔\) either \(x=-c+r\) or \(x=-c-r\)
\(|x+c|≤ r⇔ -c-r≤ x ≤ -c+r\)
\(|x+c|≥ r⇔\) either \(x≥ -c+r\) or \(x ≤ -c-r\)
Examples
(1) Solve \(|x|=4⇒x=±4\) or by slv;abs(x)-4;x ||.
(2) Solve \(|x-7|=3⇒x-7=±3+7⇒x=10\)
or \(x=4\). Or slv;abs(x-7)-3;x ||.
(3) Solve \(|2x+21|=13⇒2x+21=±13⇒2x=±13-21⇒x=-4\) or \(x=-17\) or by
slv;abs(2*x+21)-13;x ||.
(4) Solve \(|x|≥6⇒x≥6\) or \(x≤-6\) or by slv;abs(x)>=6;x ||.
(5) Solve \(|x|<8⇒-8<
x< 8\) or by slv;abs(x)<8;x ||.
(6) Solve \(|a+3|>6⇒a+3>6\) or \(a+3<-6\). So the solution is \(a>3\) or \(a<-9\) or by slv;abs(a+3)>6;a ||.
(7) Solve \(|2-3x|≤4⇒-4≤2-3x≤4⇒-6≤-3x≤2⇒\)\(-\frac{2}{3}≤x≤2\) or by slv;abs(2-3*x)<=4;x ||.
(8) Solve \(|\frac{3x}{2}+4|>1⇒|\frac{3x+8}{2}|>1⇒\frac{|3x+8|}{|2|}>1⇒|3x+8|>2\)\(⇒x>-2\) or \(x<-\frac{10}{3}\).Check slv;abs(3*x/2+4)>1;x ||.
(9) Solve \(0<|3x+5|< 11⇒-11< 3x+5< 11\)\(⇒-\frac{-16}{3}< x < 2\) and \(x≠-\frac{5}{3}\). Check slv;abs(3*x+5)< 11;x ||, and manually remove \(x=-\frac{5}{3}\).
Examples slv;abs(x)-3;x || slv;abs(x)+4;x || slv;abs(x)-r;x || slv;abs(x)>3;x || slv;abs(x)<5;x || slv;abs(x)>=6;x || slv;abs(x)<=9;x || slv;abs(x+2)<=4;x || slv;abs(x+1)< 3;x || slv;abs(b+11)>2.4;b || slv;abs(c+5.1)>=1.6;c || slv;abs(x-4)>3;x || slv;abs(x-5)>=7;x || slv;abs(x-0.4)<=2.6;x || slv;abs(a-2)< 1.3;a || abs(a-b)+abs(b-a) || abs(a-b)-abs(b-a) ||.
Interval and neighborhood A neighborhood of a number \(a\) is often expressed as an open interval containing \(a\), which is \((a-r,a+r)\) or \(|x-a|< r\) for radius \(r>0\). This means the number \(a\) is at the center of the interval.
In general, the center of an interval \([a,b]\) is \(c=\frac{a+b}{2}\), and radius \(r=\frac{b-a}{2}\) is the distance between the center and either endpoint. Thus, the intervals \([a,b], [c-r,c+r]\) or inequality \(|x-c| ≤ r\) contain the same set of numbers. These expressions also apply to open intervals.
Examples (1) The center of (-2, 4) is c = 1 and radius r = 3, and (-2, 4) = (1 - 3, 1 + 3) implies |x - 1| < 3 for all x. Check slv;abs(x-1)< 3;x ||. (2) The center of [-5, 5] is 0 and radius r = 5, and [-5, 5] can be expressed as |x| ≤ 5 for all x. Check it by slv;abs(x)<=5;x ||. (3) The center of (4, 12) is 8 and radius r = 4, and (4, 12) can be expressed as |x - 8| < 4 for all x, or slv;abs(x-8)< 4;x ||. (4) The center of (-19,-13) is -16 and radius r = 3, and (-19, -13) can be expressed as |x + 16| < 3 or by slv;abs(x+16)< 3;x ||.
3 Equations and Inequalities
Basic rules for solving equations and inequalities Suppose \(a,b,c\) are real numbers. Then
(1) \(a≤b ⇒
a\pm c≤ b\pm c\).
(2) \(a≤ b\) and \(c>0⇒ ac ≤ bc\).
(3) \(a≤ b\) and \(c<0⇒ ac ≥ bc\). In particular, if
\(a≤ b\) and \(c=-1⇒ -a≥ -b\).
(4) \(a≤b\) and \(b≤c⇒a≤c\).
(5) \(a>0⇒\frac{1}{a}>0\).
(6)
\(0 < a < b⇒\frac{1}{a}>\frac{1}{b}\).
The first four rules apply to both equation and inequalities, which imply an equation or inequality still holds after adding, subtracting, multiplying, or dividing a positive number on both sides. However, an inequality changes sign after multiplying or dividing a negative number on both sides. Use these rules to find solutions to equations and inequalities.
Linear equations and inequalities: [slv; f(x); x], [ slv(f(x), x) ]
A linear equation can be written in the form \(ax+b=0\). To solve the equation for \(x\),
(1) add \(-b\) to both sides of the equation and
have \(ax+b+(-b)=0+(-b)⇒ax=-b\), and
(2) divide both sides of the equation \(ax=-b\) by \(a\) to get \(x=-\frac{b}{a}\),
or by slv;a*x+b;x ||.
Examples
(1) Solve 2x - 3 = 0 ⇒ 2x = 3 ⇒ x = 3/2 by slv;2*x-3;x ||.
(2) Solve \(\frac{2}{3}a+4=0⇒\frac{2}{3}x=-4⇒x=\frac{4}{\frac{2}{3}}=4·\frac{3}{2}=6\) by slv;2*x/3+4;x ||.
(3) Solve \(\frac{5x}{7}-\frac{3}{4}=2⇒\frac{5x}{7}=2+\frac{3}{4}=\frac{11}{4}\)\(⇒x=\frac{\frac{11}{4}}{\frac{5}{7}}=\frac{11}{4}×\frac{7}{5}=\frac{77}{20}\) by slv;5*x/7-3/4-2;x ||.
Examples For any linear equation, simplify it into a simple form \(ax+b=0\), and use basic rules to solve it.
(1) Solve
2x - 5 = 7x + 5 ⇒ -5 = 5x + 5 ⇒ -5 -5 = 5x ⇒ 5x = -10 ⇒ x = -2, or by slv;(2*x-5)-(7*x+5);x ||.
(2) slv;-2*x-4-(3*x/4-6/5);x || slv;-2*x-3*x-(4*x+5);x || slv;-2-5*x-(-3*x+2/7);x || slv;-2*(3-4*x)-5*(7-8*x);x ||.
Notice that the codes for solving an equation requires at least three items: the operation code 'slv', an equation expression, and the variable for which the equation is to be solved. Since an equation can be expressed as "expr = 0" or f(x) = 0, only write the portion of the left side "expr" and ignore the common portion '= 0'. In case an equation is not in form of "f(x) = 0", you need to change it into this form.
Attention Write "slv(f(x), x)" to solve equation f(x) = 0 for x, and get the same results as "slv; f(x); x". For example, slv(3-5*x,x) || slv;3-5*x;x || show the same results.
Examples
(1) Solve \(x^2-3x=4\). Rewrite it as \(x^2-3x-4=0\), and enter slv;x^2-3*x-4;x || or slv(x^2-3*x-4,x) ||.
(2)
Solve \(x^2+1=0\). Type slv;x^2+1;x;C || or slv(x^2+1,x,C) ||.
Examples
(1) Express 0.4545 \(\cdots\) as a quotient of two integers. Let x = 0.4545 \(\cdots\) ⇒ 100x = 45.4545 \(\cdots\)
⇒ 100x - 45 = x and x = \(\frac{5}{11}\) by slv;99*x-45;x ||.
(2) Solving the equation by slv;10000*x-13274-10*x+13;x || finds the fraction for x = 1.3274274274 \(\cdots\) ⇒ 10000x - 13274 = 10x - 13 ⇒ x = \(\frac{13261}{9990}\).
Linear inequalities Solve linear inequalities by the above basic rules, just as solving equations. But change signs when multiplying or dividing a negative number on both sides.
Examples
(1) Solve 3 + 2x > 5 by adding -3 to both sides results in 2x > 2, and dividing 2 on both sides results in x > 1.
Type slv;3+2*x>5;x || or slv(3+2*x>5,x) ||.
(2) Solve \(1-\frac{3x}{2} <\frac{5}{4}\) by adding -1 to both sides \(⇒-\frac{3x}{2}<\frac{1}{4}\),
and dividing \(-\frac{3}{2}\) or multiplying \(-\frac{2}{3}\) on both sides \(⇒x > \frac{1}{4}×(-\frac{2}{3})⇒x>-\frac{1}{6}\).
Enter slv;1-3*x/2< 5/4;x ||.
(3) Solve \(2-5x≤3x+4\) by adding \(5x\) to both sides\(⇒2≤8x+4\), adding -4 to both sides \(⇒-2≤8x\), and dividing 8 on both sides \(⇒-\frac{1}{4}≤x⇒x≥-\frac{1}{4}\). Enter slv;2-5*x<=3*x+4;x ||.
(4) slv;-2*x/3-5*x/4>6;x || slv;2*x/7-3/4<=2;x || slv;5/6-3*x/8>4;x || slv;3*x-7>=6*x/5-4/9;x ||.
Quadratic equations and inequalities: [slv; f(x); x], [slv(f(x), x)], [slv; f(x); x; C], [slv(f(x), x, C)]
Quadratic equations can be written in the form \(ax^2+bx+c=0\) for \(a≠0\), which has at most two roots that can be
expressed in the quadratic formula \(x_1,x_2=\frac{-b±\sqrt{b^2-4ac}}{2a}\). The number of roots is determined by the discriminant
\(D=b^2-4ac\), the quantity inside the square root of the formula by slv;a*x^2+b*x+c;x ||.
(1) If \(D>0\), the equation has two distinct roots.
(2)
If \(D < 0\), the equation has no real root.
(3) if \(D=0\), the equation has one root \(x=-\frac{b}{2a}\).
The simplest quadratic equation is \(x^2=d⇒x=±\sqrt{d}\) for \(d≥0\), and the equation has no real solution for \(d<0\). Extend the idea to the equation \((x+k)^2=d⇒x+k=±\sqrt{d}⇒x=±\sqrt{d}-k\).
Examples
(1) \(x^2=1⇒x=±1\) by slv;x^2-1;x || slv(x^2-1,x) ||.
(2) \(x^2=2⇒x=±\sqrt{2}\) by
slv;x^2-2;x || slv(x^2-2,x) ||.
(3) \(x^2=0⇒x=0\) by slv;x^2;x || slv(x^2,x) ||.
(4) \((x-3)^2=5⇒x=±\sqrt{5}+3\)
by slv;(x-3)^2-5;x || slv((x-2)^2-5,x) ||.
(5) slv;x^2-1;x || slv;x^2-2;x || slv;x^2;x || slv;(x-3)^2-5;x || slv;2*(x-4)^2-7;x || slv;2*(x+3)^2/5-9;x ||
slv;4*(2-a)^2-3;a || slv;3*(b/2-1)^2-4;b ||.
Examples If possible, factoring is a simple way for solving many quadratic equations.
(1) Solve \(x^2-x=0⇒x(x-1)=0\)\(⇒x=0\) or \(x=1\). Type slv;x*(x-1);x ||.
(2) Solve \(x^2-x-30=0⇒(x-6)(x+5)=0⇒x=6\) or \(x=-5\). Enter slv;x^2-x-30;x ||.
(3) Solve \(2x^2-8=0⇒2(x^2-4)=0⇒x^2=4⇒x=±2\). Type slv;2*x^2-8;x ||.
(4) Solve \(6x^2-x-12=0⇒(2x-3)(3x+4)=0⇒x=\frac{3}{2}\) or \(x=-\frac{4}{3}\). Enter slv;6*x^2-x-12;x ||.
(5) Solve \(2x^2+11x+15=0⇒(2x+5)(x+3)=0⇒x=-\frac{5}{2}\) or \(x=-3\). Enter slv;2*x^2+11*x+15;x ||.
Examples Sometimes completing the square is an effective method for solving quadratic equations.
(1) Solve \(x^2+2x-4=0⇒x^2+2x+1-5=0⇒(x+1)^2=5⇒x=±\sqrt{5}-1\), or slv;x^2+2*x-4;x ||.
(2) Solve \(2x^2-8x+5=0⇒2(x^2-4x+4)-3=0⇒2(x-2)^2=3⇒x=±\sqrt{\frac{3}{2}}+2\) or by slv;2*x^2-8*x+5;x ||.
In general, follow this procedure to solve a quadratic equation.
(1) Check if it is in a simplest form \(x^2=d\).
(2) Try if it can be solved by factoring.
(3) Try if it can be solved by completing the square.
(4) Use the quadratic formula.
Complex roots For complex roots of equations, add the keyword "C" (optional for complex domain) to the end. The default domain of module "slv" is real numbers. The option "C" can help find complex roots for polynomials.
Examples
(1) Solve x² + 3 = 0 by slv;x^2+3;x ||, and no real roots. Check slv;x^2+3;x;C ||, and two
complex roots.
(2) Solve \(x^4-x^2+1=0\) by slv;x^4-x^2+1;x;C ||.
Quadratic inequalities For \(d> 0\), the simple quadratic inequality \(x^2<d⇒ -\sqrt{d}<x < \sqrt{d}⇒ x∈(-\sqrt{d},\sqrt{d})\). The simple inequality \(x^2>d>0⇒ x>\sqrt{d}\) or \(x < -\sqrt{d}\)\(⇒ x∈(-∞, -\sqrt{d})∪(\sqrt{d},∞)\). Note that if \(d< 0\), then \(x^2 > d\) for all \(x\), which implies \(x∈ R\) or \(x∈(-∞,∞)\). There is no solution to \(x^2 < d\) because \(x^2≥0\) for all \(x\).
Examples
(1) Solve \(x^2< 4⇒-2< x<4\), slv;x^2<4;x ||.
(2) Solve \(x^2>1⇒x>1\) or \(x < -1\), slv;x^2>1;x ||.
(3) Solve \((x+1)^2≥5⇒x>\sqrt{5}-1\) or \(x < -\sqrt{5}-1\), slv;(x+1)^2>=5;x ||.
(4) Solve \(-2(x-3)^2≥-14\)
\(⇒(x-3)^2≤7⇒-\sqrt{7}+3≤x≤\sqrt{7}+3\), slv;-2*(x-3)^2>=-14;x ||.
I. If \(x_1\) and \(x_2\) are the two real roots to the quadratic equation \(ax^2+bx+c=0\) for \(a>0\) and \(x_1 < x_2\), the solution to \(ax^2+bx+c > 0\) is \(x < x_1\) or \(x > x_2\), or \(x∈(x_1,-∞)∪(x_2,∞)\). The solution to \(ax^2+bx+c < 0\) is \(x_1 < x < x_2\) or \(x∈(x_1,x_2)\).
Examples
(1) Solve \(x(x-1)<0⇒0<x < 1\), slv;x*(x-1)<0;x ||.
(2) Solve \((x+3)(x-2)>=0⇒x≥2\) or \(x≤-3\), slv;(x+3)*(x-2)>=0;x ||.
(3) Solve \(x^2-x-6>0\)\(⇒(x-3)(x+2)>0 ⇒x>3\) or \(x<-2\), slv;x^2-x-6>0;x ||.
(4) slv;x^2+x-1<=0;x || slv;2*x^2+3*x-5>0;x ||.
II. Suppose the quadratic equation \(ax^2+bx+c=0\) does not have any real root or \(b^2-4ac < 0\). Then the solution to \(ax^2+bx+c > 0\) is \(x∈ R\) or \(x∈(-∞,∞)\), and there is no solution to \(ax^2+bx+c<0\) if \(a>0\). Similarly, the solution to \(ax^2+bx+c < 0\) is \(x ∈ R\), and there is no solution to \(ax^2+bx+c >0\) if \(a < 0\).
Examples
(1) Solve \(x^2+3>0⇒x∈R\), slv;x^2+3>0;x ||.
(2) Solve \(x^2+2x+5<0⇒(x+1)^2<-4\), which implies
no solution to the inequality, slv;x^2+2*x+5<0;x ||.
(3) The inequality \(-5+x-x^2>0⇒x^2-x+5<0\) has no solution, slv;-5+x-x^2>0;x ||.
(4) The inequality \(-2x^2+3x-9<0\) holds for all \(x\), slv;-2*x^2+3*x-9<0;x ||.
III. In case \(b^2-4ac=0\), the quadratic equation \(ax^2+bx+c=0\) has one root \(x=x_1\). The solution to \(ax^2+bx+c > 0\) is \(x∈R\) and \(x≠x_1\), and there is no solution to \(ax^2+bx+c<0\) for \(a>0\). Similarly, the solution to \(ax^2+bx+c < 0\) is \(x ∈ R\) and \(x≠ x_1\), and there is no solution to \(ax^2+bx+ > 0\) if \(a<0\).
Examples
(1) The solution to \(x^2-6x+9>0\) is \(x≠3\), or by slv;x^2-6*x+9>0;x ||.
(2) There is no solution to
\(x^2-8x+16<0\), or by slv;x^2-8*x+16<0;x ||.
(3) The solution to \(-2(x-5)^2<0\) is \(x≠5\), or by slv;-2*(x-5)^2<0;x ||.
(4) There is no solution to \(-3(x+4)^2>0\), or by slv;-3*(x+4)^2>0;x ||.
Attention The implication \(x^2>2x⇒x>2\) is incorrect. The variable \(x\) can be 0 or negative. An inequality does not hold after dividing \(0\) or negative number on both sides. The correct solution is \(x>2\) or \(x<0\). Check it by slv;x^2>2*x;x ||. Similarly, the implication \(x^2>x^3⇒x<1\) is incorrect. The correct solution is \(x^2-x^3>0⇒x^2(1-x)>0\)\(⇒x≠0\) and \(x<1\). Check slv;x^2>x^3;x ||.
Other equations and inequalities: [slv; f(x); x], [slv(f(x), x)], [slv; f(x); x; C], [slv(f(x), x, C)]
Equations other than linear and quadratic are more difficult to solve in general. In addition to basic rules, there are a few general rules for
solving such equations.
(1) If \(f(x)g(x)=0⇒\)\(f(x)=0\) or \(g(x)=0\).
(2) If \(\frac{f(x)}{g(x)}=0⇒f(x)=0\) and
\(g(x)≠0\).
(3) If \(\frac{f(x)}{g(x)}=h(x)⇒\frac{f(x)}{g(x)}-h(x)=0\).
For equations involving algebraic functions such as polynomials, rational, and power/root functions with the form \(f(x)^{\frac{m}{n}}=c\) for \(\frac{m}{n}\) a rational number in simplest form, you can raise the power \(\frac{n}{m}\) to both sides, if possible, and obtain \(f(x)=c^{\frac{n}{m}}\).
Examples
(1) Solve \(\frac{1}{x}=2⇒1=2x⇒x=\frac{1}{2}\), slv;1/x-2;x ||.
(2) Solve \(\frac{2}{x+3}=5⇒2=5(x+3)
⇒\)\(x=-\frac{13}{5}\), slv;2/(x+3)-5;x ||.
(3) Solve \(\frac{15}{x^2-2x}=1⇒x^2-2x-15=0\)\(⇒x=-5\) or \(x=3\), slv;15/(x^2-2*x)-1;
x ||.
(4) Solve \(\frac{2}{(x+1)^3}=-1⇒-(x+1)^3=2⇒(x+1)^3=-2\)\(⇒x+1=\sqrt[3]{-2}⇒x=-\sqrt[3]{2}-1\), slv;2/(x+1)^3+1;x ||.
(5) Solve \(\frac{2x+11}{x^2+1}=0⇒2x+11=0⇒x=-\frac{11}{2}\), slv;(2*x+11)/(x^2+1);x ||.
(6) Solve \(\frac{2}{x-3}=x+\frac{1}
{x^2}⇒\frac{2}{x-3}=\frac{x+1}{x^2}\)\(⇒\frac{2}{x-3}-\frac{x+1}{x^2}=0⇒\frac{2x^2-(x+1)(x-3)}{x^2(x-3)}=0\)\(⇒\frac{x^2+2x+3}{x^2(x-3)}
=0⇒x^2+2x+3=0\), and there is no real solution because the discriminant \(D=-8<0\). slv;2/(x-3)-x-1/x^2;x ||.
(7) Solve \(\frac{x^4-16}
{x^2+2x-8}=0⇒\)\(x^4-16=0⇒x^4=16\)\(⇒x=±16^{\frac{1}{4}}=±2\). However, \(x≠2\) because the denominator is 0 for \(x=2\).
So the solution is \(x=-2\). Check slv;(x^4-16)/(x^2+2*x-8);x ||.
(8) slv;2/(x-3)-(x+4)/5;x || slv;(2*a-3)/(4-a)-6;a || slv;(4*b-5)/8-(6-b)/7;b || slv;(3*y+5)/(7-2*y)-3/(1+y);y || slv;(1-z)/(1+z)-3/(z+2);z || slv;(4-5*c)/6-2*c/(1+c);c || slv;(2*x-3)/5-1/(x+2);x ||.
Attention The outputs from some equations involve complex numbers, so their solutions to those equations sometimes do not look helpful. As an example, the output from slv;2/(x-3)-x-1/x^2;x || is hard to understand because the equation has no real solution.
Rules for product and quotient inequalities Let \(f(x), g(x)\) be two functions. Then
(1) \(\frac{f(x)}{g(x)}>0⇔f(x)g(x)> 0\) and \(\frac{f(x)}{g(x)}<0⇔f(x)g(x)<0\) for \(g(x)≠0\).
(2) \(f(x)g(x) > 0⇔f(x)>0\) and \(g(x)>0\) or \(f(x)<0\) and \(g(x)<0\).
(3) \(f(x)g(x) < 0 ⇔f(x)>0\) and \(g(x)<0\) or \(f(x)<0\) and \(g(x)>0\).
Examples Solve \(x(x-3) > 0\). Case I \(x > 0\) and \(x-3>0⇒x>3\). Case II \(x<0\) and \(x-3<0⇒x<0\). So the final solution is either \(x>3\) or \(x<0\) or \(x∈(-∞,0) ∪(3,∞)\). Check it by slv;x*(x-3)>0;x || slv(x*(x-3)>0,x) ||.
To solve \(\frac{f(x)}{g(x)} < h(x)\) or \(\frac{f(x)}{g(x)} > h(x)\), first write the inequality as \(\frac{f(x)}{g(x)} -h(x) < 0\) or \(\frac{f(x)}{g(x)} -h(x) > 0\), then simplify the left side of each expression, and find the solution by the previous rules.
Attention The inequality \(\frac{f(x)}{g(x)} < h(x)\) does not imply \(f(x) < h(x)g(x)\) because \(g(x)\) can be negative.
Examples
(1) Solve \(\frac{1}{x} > 2⇒\frac{1}{x}-2>0⇒\frac{1-2x}{x}>0\). Case I \(1-2x>0\) and \(x>0⇒0<x
<\frac{1}{2}\). Case II \(1-2x<0\) and \(x<0\). There is no \(x\) satisfying these two inequalities. || slv;1/x>2;x ||.
(2) Solve
\(\frac{2x}{3} <\frac{5x^2}{4}⇒\)\(8x < 15x^2⇒x(15x-8)>0 ⇒x>0,x>\frac{8}{15}\) or \(x < 0, x < \frac{8}{15}\). The solution is
\(x>\frac{8}{15}\) or \(x < 0\). Check it by slv;2*x/3<5*x^2/4;x ||.
(3) Solve \(\frac{2x-15}{4x+5}<0\). Case I:
\(2x-15>0⇒x>\frac{15}{2}\) and \(4x+5<0\)\(⇒x<-\frac{5}{4}\). No solution in this case I. Case II: \(2x-15<0⇒x<\frac{15}{2}\) and
\(4x+5>0⇒x>-\frac{5}{4}\). So the solution is \(-\frac{5}{4} < x < \frac{15}{2}\). || slv;(2*x-15)/(4*x+5)<0;x || slv((2*x-15)/(4*x+5)<0,x) ||.
(4) Solve \(\frac{x-2}{2x+5}>x⇒\frac{x-2}{2x+5}-x>0⇒\frac{x-2-x(2x+5)}{2x+5}>0\)\(⇒\frac{x^2+2x+1}{2x+5}<0\). Since \((x+1)^2≥0\), the solution to \(2x+5<0⇒x<-\frac{5}{2}\) is the final solution. Check it by slv;(x-2)/(2*x+5)>x;x ||.
(5) Solve \(5x(x-7)(x+7)<0\). Case I \(x>0\) and \(x^2-49<0⇒\)\(-7<x<7\). The solution to case I is \(-7<x<0\). Case II \(x<0\) and \(x^2-49>0⇒x>7\) or \(x<-7\). The solution to case II is \(x> 7\). Thus, the final solution is \(-7<x<0\) or \(x>7\). || slv;5*x*(x-7)*(x+7)>0;x ||.
(6) Solve \(\frac{1}{x-2}>\frac{4}{x+3}⇒\frac{1}{x-2}-\frac{4}{x+3}>0⇒\)\(\frac{x+3-4(x-2)}{(x-2)(x+3)}>0⇒\frac{11-3x}{(x-2)(x+3)}>0\). Case I \(11-3x>0\) and \((x-2)(x+3)>0\), || slv;11-3*x>0;x || slv;x^2+x-6>0;x ||, and the solution is \(x<-3\) or \(2<x<\frac{11}{3}\). Case II \(11-3x<0\) and \((x-2)(x+3)<0\) by slv;11-3*x<0;x || slv;x^2+x-6<0;x ||, and there is no solution to case II. The final solution is \(x<-3\) or \(2<x<\frac{11}{3}\), || slv;1/(x-2)>4/(x+3);x ||.
(7) Solve \(\frac{1}{x}<\frac{2x}{x-5}⇒\frac{1}{x}-\frac{2x}{x-5}<0⇒\frac{-(2x^2-x+5)}{x(x-5)}<0\). Since \(-(2x^2-x+5)<0\) for all \(x\), only need to solve \(x(x-5)>0\) || slv;x^2-5*x>0;x ||, and the final solution is \(x<0\) or \(x>5\). || slv;1/x<2*x/(x-5);x ||.
Attention The implication \(\frac{2x-1}{3x+5}< 1⇒2x-1< 3x+5⇒x>-6\) is incorrect. The denominator \(3x+5\) may be negative. An inequality changes sign after multiplying a negative number on both sides. The correct solution is \(x<-6\) or \(x>-\frac{5}{3}\). Check it by slv;(2*x-1)/(3*x+5)< 1;x ||.
Absolute equations and inequalities Use basic properties of simple absolute-value equations and inequalities to obtain solutions to more general and complicated ones. Suppose \(c≥0\) is a constant.
(1) To find solution to \(|f(x)|=c\), you need to solve these two equations \(f(x)=±c\) for \(x\).
(2) To solve \(|f(x)|≥c\) is to find solutions to either \(f(x)≥c\) or \(f(x)≤-c\).
(3) To solve \(|f(x)|≤c\) is to find solutions to \(-c≤f(x)≤c\).
(4) To solve equations in the form \(|f(x)|=|g(x)|\), you need to solve \(f(x)=±g(x)\) for \(x\).
(5) To solve \(|f(x)|=g(x)\) is to find \(x\) such that \(f(x)=±g(x)\) and \(g(x)≥0\). The final solution is the intersection of solutions to the two equations and one inequality.
(6) To solve \(|f(x)|≥g(x)\) is to find solutions to either \(f(x)≥g(x)\) or \(f(x)≤-g(x)\).
(7) Solving \(|f(x)|≤g(x)\) is to find solutions to \(-g(x)≤f(x)≤g(x)\).
(8) To solve \(|f(x)|≤|g(x)|\) is to find solutions \(-|g(x)|≤f(x)≤|g(x)|⇒\) Case I \(-g(x)≤f(x)≤g(x)\) if \(g(x)≥0\), and Case II \(g(x)≤f(x)≤-g(x)\) if \(g(x)< 0\).
These procedures for absolute values boil down to finding ways of working on expressions without absolute values. Note that if \(c< 0\), then \(|f(x)|=c\) has no solution, and \(|f(x)|>c\) for all \(x\).
Examples
(1) \(|x^2-2x-5|=3⇒x^2-2x-5=±3\). The solution to \(x^2-2x-5=3\) is by slv;x^2-2*x-8;x || and the solution to
\(x^2-2x-5=-3\) is by slv;x^2-2*x-2;x ||. Or enter slv;abs(x^2-2*x-5)-3;x || for final solution.
(2) \(|x^2-5|>4⇒x^2-5>4\) or
\(x^2-5<-4\). Solve the inequalities by slv;x^2>9;x || slv;x^2< 1;x ||, and the final solution by slv;abs(x^2-5)>4;x ||.
(3)
\(|3-2x-x^2|< 4⇒|x^2+2x-3|< 4⇒-4< x^2+2x-3< 4\). Get solution to each inequality by slv;x^2+2*x+1>0;x || slv;x^2+2*x< 7;x ||,
and final solution by slv;abs(3-2*x-x^2)< 4;x ||.
(4) \(|x^2-3|=|2x-17|⇒x^2-3=±(2x-17)\) and solve by slv;x^2-3-(2*x-17);x ||
slv;x^2-3+(2*x-17);x ||, and final solution by slv;abs(x^2-3)-abs(2*x-17);x ||.
(5) \(|x^2-x-6|=x-1⇒x^2-x-6=±(x-1)\) and
\(x-1≥0\). Find solutions by slv;x^2-2*x-5;x || slv;x^2-7;x ||, and final solution by slv;abs(x^2-x-6)-(x-1);x ||. Note the solutions
\(x=-\sqrt{7},x=1-\sqrt{6}\) are less than 1, making \(x-1< 0\), which is impossible.
(6) \(|2-7x|>3x-16\)\(⇒2-7x>3x-16\) or
\(2-7x<-(3x-16)\) and \(3x-16≥0\). Get the solutions by slv;2-7*x>3*x-16;x || slv;2-7*x< 16-3*x;x || slv;abs(2-7*x)>3*x-16;x ||.
(7)
\(|10-3x|< 11x+18⇒-(11x+18)< 10-3x< 11x+18\). Get solution by slv;10-3*x< 11*x+18;x || for \(x>-\frac{4}{7}\) and slv;-11*x-18<10-3*x;x ||
for \(x>-\frac{7}{2}\). The final solution is \(x>-\frac{4}{7}\) or by slv;abs(10-3*x)< 11*x+18;x ||.
(8) \(|x-1|<|3x-5|⇒\)\(-|3x-5|< x-1< |3x-5|\). Case I if \(3x-5≥0\), then \(5-3x< x-1< 3x-5\)\(⇒3x-5>x-1\) and \(5-3x< x-1\). The solution to case I is \(x>2\). Case II if \(3x-5< 0\), then \(3x-5< x-1< 5-3x⇒3x-5< x-1\) and \(x-1< 5-3x\). The solution to case II is \(x<\frac{3}{2}\). The final solution is \(x>2\) or \(x<\frac{3}{2}\). Get final solution by slv;abs(x-1)< abs(3*x-5);x ||.
(9) \(\frac{|2x-1|}{|7-3x|}=4⇒|\frac{2x-1}{7-3x}|=4⇒\frac{2x-1}{7-3x}=±4\). Solve the equations by slv;(2*x-1)/(7-3*x)-4;x || slv;(2*x-1)/(7-3*x)+4;x || slv;abs((2*x-1)/(7-3*x))-4;x ||.
Examples slv;abs(2*x-8)-5;x || slv;abs(x-2)-(x-2);x || slv;abs(x+3)+(x+3);x || slv;abs(x-4)-2*x+1;x || slv;abs(2-x)+3-5*x;x || slv;abs(x+2)-abs(3-x);x || slv;abs(4*x+7)-abs(2-4*x);x || slv;x+1< abs(x);x || slv;abs(2/x-3)>4;x || slv;abs(x+1/x)>2;x || slv;abs(x-2)< abs(x-3);x || slv;abs(x-1)>abs(x-2);x || slv;abs(2*x+3)<=4;x || slv;3*y-2>=abs(4*y-5);y || slv;abs((x-1)/(x+4)-2);x || slv;abs(a-1);a ||.
Examples Solve equations and inequalities involving more general functions. || slv;x+a;x || slv;2*a*x+3*x;a || slv;b^2-3*b>4;b || slv;(c-1)^2*(c+2)< 0;c || slv;y^2>y^3;y || slv;(x-1)*(x-2)< 0;x || slv;(x-1)/(x+3)-3;x || slv;2*sin(x)-1;x || slv;y^3-y;y || slv;2*log(b)-3;b || slv;exp(-2*u)-5;u || slv;sin(t)-cos(t);t || slv;2*sin(t)+cos(t)-1;t || slv;3*asin(x)-2*pi;x || slv;2*acosh(2*x)-3;x ||.
4 Linear Equation System
A system of linear equations (or linear system) is a set of two or more linear equations involving the same set of variables. In standard form, a linear equation is written as \(a_1x_1+a_2x_2+\cdots+a_nx_n=b\), where \(a_1,\cdots,a_n\) are constants and \(x_1,\cdots,x_n\) are variables. If all equations in a linear system are in standard form, the system is in standard form.
In mathematics, the theory of a linear system is fundamental to the subject of linear algebra. But in this section, we only discuss some basic methods for finding the solution set to a linear system, which is an assignment of values to the set of variables such that each equation is satisfied. Note that a linear system may have a unique solution, or infinitely many solutions, or no solution.
Linear systems of two variables: [eqs; equ1; equ2; x; y], [eqs(equ1, equ2, x, y)]
Linear system of two variables are in the form of \(a_{11}x+a_{12}y=b_1\) and \(a_{21}x+a_{22}y=b_2\), which involve two
variables and two linear equations. Three methods are often used for solving the system.
(1) Substitution method. Solve one variable in an
equation in terms of the other variable, and then substitute this variable expression into the other equation to determine the value of the other
variable.
(2) Elimination method. Usually multiply a constant on both sides of an equation, and then eliminate one variable
by adding or subtracting one equation to the other.
(3) Graph method. If the graph of two lines (each line for each equation) has a point of
intersection, the coordinates of the point is the solution to the system.
Examples Solve the linear system 2x + 3y = 4 and x - 3y = 2.
(1) Substitution method: Solves for x = 2 + 3y and substitute this
expression into the first equation 2(2 + 3y) + 3y = 4 ⇒ y = 0. Substitute y = 0 into the second equation to obtain x = 2. So x = 2, y = 0
is the solution of the system.
(2) Elimination method: Adding the two equations results in 3x = 6 ⇒ x = 2. Substituting x = 2 into
the second equation for y = 0. Check by eqs;2*x+3*y-4;x-3*y-2 ||.
(3) Graph method: Express \(y\) in terms of \(x\) for each equation
\(y=\frac{4-2x}{3},y=\frac{x-2}{3}\), and enter plt;(4-2*x)/3;(x-2)/3 ||. The graph shows the two lines intersect at (2, 0).
In the previous example, the operation code "eqs" followed by the set of distinct equations "equ1; equ2" can be used for solving a linear system. Express each equation in the system as "equ1 = 0", "equ2 = 0" and enter "eqs; equ1; equ2" for solutions. Keep in mind that just enter the left portion ("equ1" or "equ2") of each equation, and ignore the portion "= 0". The order of the equations does not matter, and the solutions to the unknown variables are displayed in alphabetical order.
Specify the variables for which the system is to be solved by adding them to the end of the above codes. But it is optional unless there are additional variables involved in the system. For example, to solve the system x + 2y - a and 3x - y + b for x and y by eqs;x+2*y-a;3*x-y+b;x;y ||. You need to add x and y to the end to indicate you want to solve for x and y rather than other variables in the system.
Attention Use function call "eqs(equ1, equ2)" to get the same results as "eqs; equ1; equ2". Notice that the solutions to variables from "eqs(equ1, equ2)" are listed in alphabetical order.
Examples
(1) Solve the linear system 2x - y = 4 and 3x + 5y = 1 by eqs;2*x-y-4;3*x+5*y-1 || eqs(2*x-y-4,3*x+5*y-1) ||.
(2)
eqs;b-2*a;4*b-3 || eqs;-3*m-n+1;2*n-4*m-15 || eqs;x+y-2*z-3;x+2*y-3*z;2*x-y+z-8 || eqs;a+b+c-3;a-2*b+3*c-1;2*a+2*b+c-5 ||
eqs;x+y+z-u-1;2*x+y-3*u+z+1;3*x-2*y-u+2;x-y+5*z-2*u-5 ||.
Examples
(1) Solve \(x=6,3x-2y=4\). Substituting \(x=2\) into the second equation for \(y=7\). Check eqs;x-6;3*x-2*y-4 ||.
(2) Solve \(x+2y=4,3x+7y=13\). Express \(x=4-2y\) in the first equation and substitute it into the second equation \(3(4-2y)+7y=13⇒y=1\).
Substituting \(y=1\) into the first equation for \(x=2\) by eqs;x+2*y-4;3*x+7*y-13 || eqs(x+2*y-4,3*x+7*y-13) ||.
(3) Solve \(3x+8y=11,5x-8y=-13\). Adding the two
equations results in \(8x=-2⇒x=-\frac{1}{4}\). Substitute it into the first equation \(3(\frac{-1}{4})+8y=11⇒x=\frac{47}{32}\) by eqs;3*x+8*y-11;5*x-8*y+13 ||.
(4) Solve \(2x-5y=9\) and \(6x+11y=1\). Multiplying both sides of the first equation by 3 results in
\(6x-15y=27\). Then subtracting the new and second equations results in \(-26y=26⇒y=-1\). Substituting \(y=-1\) into the first equation for \(x=2\).
Check eqs;2*x-5*y-9;6*x+11*y-1 || eqs(2*x-5*y-9,6*x+11*y-1) ||.
(5) Solve \(2x+3y=-7,5x-8y=3\). Express \(x=-\frac{7-3y}{2}\) and substitute it into the second equation
\(5(-\frac{7-3y}{2})-8y=3⇒y=\frac{-41}{31}\). Substitute \(y\) into \(x\) for \(x=\frac{-47}{31}\). Check eqs;2*x+3*y+7;5*x-8*y-3 ||.
Geometric interpretation Two lines in the plane either intersect or are parallel or overlapping. In general, if the corresponding constants of any two equations (in standard form) of a linear system are proportional, the two equations are exactly the same and the system has infinitely many solutions. In case of two-variable or equations, the two lines are overlapping.
If the corresponding constants of all variables are proportional, but the proportion of the right-hand side constants is not equal to that of the left, the system has no solution. In case of two equations, the two lines are parallel.
Examples
(1) The two lines 3x + 7y = 5 and 8x - y = 9 intersect at a point. Check plt;(5-3*x)/7;9-8*x ||
eqs;3*x+7*y-5;8*x-y-9 ||.
(2) The two lines in the system x + y = 2, 3x + 3y = 17 are parallel. Check plt;2-x;(17-3*x)/3 || eqs;x+y-2;3*x+3*y-17 ||.
(3) The two lines in the system 2x + 2y = 5, 14x + 14y = 35 are overlapping. Check plt;(5-2*x)/2;(35-14*x)/14 || eqs;2*x+2*y-5;14*x+14*y-35 ||.
Notice in the above example (1), constants of the two equations are not proportional. In example (2), the left-side constants are proportional and equal to 1/3, but it is not equal to the proportion of the right-side constants 2/17. In example (3), the corresponding constants have the same proportion 1/7.
Linear systems of more than two variables: [eqs; equ1; equ2; ...], [eqs(equ1, equ2, ...)]
Substitution and elimination methods also apply to linear systems of more than
two variables.
(1) Substitution: Express one variable in terms of the other variables, and substitute this variable into the
other equations, making the system one fewer variable. Continue this process until all values of the variables can be determined.
(2) Elimination: Multiply some constant on both sides of one equation, and then add or subtract the resulting equation to the other equations,
leading to a system of one fewer variable.
Use the code pattern "eqs; equ1; equ2; ..." or "eqs(equ1, equ2, ...)" to solve a linear system, and they get the same solutions. The solutions to unknown variables from eqs(equ1, equ2, ...) are listed in an alphabetical order.
Examples
(1) Solve x = 1, x + y = 3, 2x - 5y + 3z = 7. Substituting x = 1 into the second equation for y = 2. Substituting x and y
into the third equation for z = 5. Check eqs;x-1;x+y-3;2*x-5*y+3*z-7 || eqs(x-1,x+y-3,2*x-5*y+3*z-7) ||.
(2) Solve x - 4y - 3z = 1, 2x - y = 3, 6x - 3y + 2z = 7. Solving
y = 2x - 3 and substituting it into the first and third equations results in x - 4(2x-3) - 3z = 1, 6x - 3(2x-3) + 2z = 7. Clean the two equations and
get 7x + 3z = 11, z = -1, which implies x = 2 and thus y = 1. Check eqs;x-4*y-3*z-1;2*x-y-3;6*x-3*y+2*z-7 ||.
(3) Solve x + 2y - 3z = 5,
2x - y + z = -5, 2x + 4y - 3z = 10. Multiplying 3 on both sides of the second equation results in 6x - 3y + 3z = -15. Adding this new equation to the
first and second equations results in 7x - y = -10, 8x + y = -5. Adding these two new equation results in 15x = -15 ⇒ x = -1, which implies
y = 3. Substituting x and y into any of the three equations for z = 0. Check eqs;x+2*y-3*z-5;2*x-y+z+5;2*x+4*y-3*z-10 ||.
(4) Solve
x + 3y - 2z = 5, 3x + 5y + 6z = 7, 2x + 4y + 3z = 8. Multiplying the first equation by 3 and adding the new equation to the second equation results
in 3x + 7y = 11. Multiply the third equation by 2 and subtracting the new equation and the second equation results in x + 3y = 9. Solve the resulting
system of two variables by substitution for x = -15, y = 8, or by eqs;3*x+7*y-11;x+3*y-9 ||. Substituting x and y into any of the three equations
for z = 2. Check eqs;x+3*y-2*z-5;3*x+5*y+6*z-7;2*x+4*y+3*z-8 || eqs(x+3*y-2*z-5,3*x+5*y+6*z-7,2*x+4*y+3*z-8) ||.
5 Nonlinear Equation System
A system of equations in which any one is not linear is a nonlinear system. Solving a nonlinear system is much more complicated than a linear system, and there is no general procedures for solutions.
A nonlinear system may have no solution, or infinitely many solutions, or have any number of real or complex solutions. For a system of two equations, you may apply substitution or elimination method, or use graph method to spot possible solutions. Also apply elimination method in some nonlinear systems.
Nonlinear systems of two variables: [eqs; equ1; equ2; ... ], [eqs(equ1, equ2, ...)]
If there is a linear equation in a nonlinear system, it is often effective to first express one variable in terms of the other from the linear equation, and then substitute it into the nonlinear equations.
Examples Solve the system \(x^2+y^2=1,x+2y=1\). The second is linear. Express \(x=1-2y\), and substitute it into the first equation \((2y-1)^2+y^2=1\)\(⇒5y^2-4y=0⇒y=0,y=\frac{4}{5}\), which implies \(x=1,x=\frac{-3}{5}\). So the solution is \(x=1,y=0\) or \(x=\frac{-3}{5},y=\frac{4}{5}\). Check eqs;x^2+y^2-1;x+2*y-1 ||.
Examples Solve \(x^2-y^2=1,x^2+y^2=31\). Adding the two equations results in \(2x^2=32⇒x=±4\), which implies \(y=±\sqrt{15}\). Thus, there are four solutions \(x=4,y=±\sqrt{15}\) and \(x=-4, y=±\sqrt{15}\) by eqs;x^2-y^2-1;x^2+y^2-31 ||.
Use the code pattern "eqs; equ1; equ2; ..." to find solutions of nonlinear systems. As before, express each equation in the system as "equ1 = 0", "equ2 = 0", ..., and just enter the left portion ("equ1" or "equ2") of each equation (ignore the portion "= 0"). The order of each equation does not matter, and the solutions to the unknown variables are displayed in alphabetical order. By default, the operation “eqs” gives solutions to all variables in the system. One can specify particular variables to be solved at the end. In this case, the expression would become "eqs(f(x,y), g(x,y), x, y)" or "eqs; f(x,y); g(x,y); x; y", for example.
Attention Use "eqs(equ1, equ2, ...)" to get the same solutions as "eqs; equ1; equ2; ...". The solutions to unknown variables from "eqs(equ1, equ2, ...)" are listed in alphabetical order.
Examples
(1) eqs;x*y-2;1/x-y-1 || or eqs(x*y-2,1/x-y-1) || solves the system of \(xy=2,\frac{1}{x}-y=1\).
(2) eqs;s^2+t^2-4;2*s-t-1 ||
or eqs(s^2+t^2-4,2*s-t-1) || solves the system of \(s^2+t^2=4,2s-t=1\).
(3) eqs;a-b+1;b-a^2-1 || finds solutions of the system of \(b=a+1,b-a^2=1\).
(4) eqs;u^2-v^2-6;2*u^2-3*v^2+4 || solves the system of \(u^2-v^2=6\), \(2u^2-3v^2=-4\).
II Geometry
Table of Contents
1 Cartesian Coordinate System
Cartesian coordinate system provides a basic framework for graphing and studying functions and equations. We use coordinates to study geometry and prove some theorems. Analytic (coordinate or Cartesian) geometry employs coordinate system in contrast to synthetic (or pure) geometry. Proofs by use of coordinates are called analytic, which differs from proofs by deductions using axioms and established theorems.
A Cartesian coordinate system has two perpendicular coordinate axes, which divide the coordinate plane into four quadrants numbered I, II, III, IV. The horizontal axis is called the x-axis, the vertical axis is y-axis, and they intersect at the origin. These two coordinates are two real number lines, where positive directions point to the right and upward and negative directions to the left and downward. So any point on the coordinate plane and an ordered pair of real numbers have a one-to-one correspondence.
Points on Plane: pln; pt=(x1,y1) || pln;pt=[(x1,y1),(x2,y2)] || pln;pt=[(x1,y1),(x2,y2),(x3,y3),...]
If P is a point on the coordinate plane, draw two lines through P perpendicular to both coordinate axes. The line intersects the x-axis with x-coordinate a, and the line intersects the y-axis with y-coordinate b. Then the ordered pair (a, b), which is also called coordinates, is assigned to point P.
The origin has coordinates (0, 0). Any point on the x-axis has coordinates (a, 0), and any point on y-axis has coordinates (0, b). The coordinates (a, b) of any point in quadrant I satisfy a > 0 and b > 0, in quadrant II a < 0 and b > 0, in quadrant III a < 0 and b < 0, and in quadrant IV a > 0 and b < 0. Simply denoted, the signs of coordinates in the four quadrants are I (+, +), II (-, +), III (-, -) and IV (+, -).
Type operation code 'pln', followed a keyword for coordinates, and plot points, lines, angles and polygons on the xy-plane. The necessary elements are ordered pairs of numbers for points, which are written as usual textbooks. Use keyword "pt" for plotting points, "ln" for line segments, and "pg" for polygons.
Examples
(1) The code pln;pt=(2,5) || shows a point of coordinates (2, 5) in the plane. Check more by pln;pt=(0,0) ||
pln;pt=(3,0) || pln;pt=(7,3)|| pln;pt=(-3,0) || pln;pt=(-2,-4) ||.
(2) The code pln;pt=[(-5,7),(1,-6)] || gives two points and
calculates their distance. Check more by pln;pt=[(0,0),(3,4)] || pln;pt=[(-2,3),(5,5)] || pln;pt=[(2,-5),(2,4)] || pln;pt=[(-3,4),(5,4)] ||
(3) Multiple points and lines. || pln;pt=[(5,6),(-3,7),(-6,-2),(3,-8)] || plots four points on four quadrants, and
pln;pt=[(4,0),(0,6),(-3,0),(0,-5)] || graph four points on coordinate axes. || pln;pt=[(4,-5),(-3,-4),(-3,6)] || graph three points.
2 Distance, Line, Slope, and Symmetry
Distance and midpoint: || pln; pt = [(x1, y1), (x2, y2)] ||
Given two points \(P(x_1,y_1),Q(x_2,y_2)\) in the plane, the coordinates of the midpoint between
\(P\) and \(Q\) are \((\frac{x_1+x_2}{2},\frac{y_1+y_2}{2})\), and the distance between \(P\) and \(Q\) is \(\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\).
When you plot two points (x1, y1) and (x2, y2) in the plane by the code pattern "pln; pt=[(x1,y1),(x2,y2)]", you also get their distance calculated.
Examples
(1) The midpoint between P(2,6) and Q(-4,-6) is (-1, 0). Plot them by pln;pt=[(2,6),(-1,0),(-4,-6)] ||. The distance
between P and Q is given by ((6+6)**2+(2+4)**2)**(1/2), pln;pt=[(2,6),(-4,-6)] ||.
(2) The midpoint between (-5, 0) and (5, 0) is (0, 0),
and the distance is 10. Check the plots by pln;pt=[(-5,0),(5,0),(0,0)] || pln;ln=[(-5,0),(5,0)] ||.
(3) The midpoint between (0,5) and (-4, 8)
is (-2, 13/2), and the distance is 5. Check their plots by pln;pt=[(-2,13/2),(-4,8),(0,5)] || pln;ln=[(-4,8),(0,5)] ||.
Slopes and equations of lines: || pln; ln = [(x1,y1), (x2,y2)] ||
The slope of a line through points \(P(x_1,y_1),Q(x_2,y_2)\) in the xy-plane is
\(m=\frac{y_2-y_1}{x_2-x_1}=\frac{Δy}{Δx}\), where \(Δy\) is called vertical increment (rise or vertical change) and \(Δx\)
is horizontal increment (run or horizontal change). The equation of the line through \(P\) and \(Q\) is \(y=m(x-x_1)+y_1\) or \(y=m(x-x_2)+y_2\).
When you plot a line through two points (x1, y) and (x2, y2) by the code pattern "pln; ln = [(x1,y1), (x2,y2)]", you also get the equation of the line.
Examples
(1) The slope of a line through (0, 0) and (4, 3) is \(m=\frac{3-0}{4-0}=\frac{3}{4}\) and the equation of the line is
\(y=\frac{3}{4}x\) or \(y=\frac{3}{4}(x-4)+3\) by pln;ln=[(0,0),(4,3)] ||.
(2) The slope of a line through (-2, 5) and (5, -1) is
\(\frac{-6}{7}\), and the equation of the line is \(y=\frac{27}{7}-\frac{6}{7}x\) by pln;ln=[(-2,5),(5,-1)] ||.
(3) The slope of a
line through (-3, 4) and (5, 4) is 0; the equation of the line is \(y=4\), a horizontal line by pln;ln=[(-3,4),(5,4)] ||.
(4) The slope
of a line through (2,-5) and (2,4) is undefined (the denominator is 0), and the equation of the line is \(x=2\), a vertical line
by pln;ln=[(2,-5),(2,4)] ||.
For two points on the plane, use the keyword "ln" (line) and the coordinates of two points, you will get a line through the two points with an equation for the entire line, so you can read the slope from the equation in standard form.
Examples
(1) pln;ln=[(-3,-2),(4,6)] || plots a line through (-3, -2) and (4, 6) with a slope of 8/7 and equation of
y = 8x/7 + 10/7.
(2) pln;ln=[(-4,-3),(5,8)] || plots a line of slope 11/9 and equation y = 11x/9 + 17/9.
(3) Sketch a horizontal
line y = -3 through (-7, -3) and (8, -3) by pln;ln=[(-7,-3),(8,-3)] ||.
(4) Plot a vertical line x = 4 through (4, -6) and (4, 7)
by pln;ln=[(4,-6),(4,7)] ||.
(5) For more than one lines, type pln;ln=[(-2,-4),(5,8)];ln=[(3,-5),(-4,7)] ||, and it shows two lines.
One through points (-2, -4) and (5, 8), and the other through (3, -5) and (-4, 7).
(6) Similarly, pln;ln=[(-6,-2),(6,-2)];
ln=[(-6,2),(6,2)];ln=[(-6,5),(6,5)] || plots three horizontal lines.
(7) pln;ln=[(-6,-2),(-6,7)];ln=[(6,-5),(6,5)];ln=[(3,5),(3,-5)] ||
plots three vertical lines.
(8) pln;ln=[(-6,0),(1,4)];ln=[(2,5),(-3,-5)];ln=[(3,5),(-4,8)] || plots three slant lines.
Distance from a point to a line The distance from a point \((x_0,y_0)\) to a line with equation \(ax+by+c=0\) is given by \( d=\frac{|ax_0+by_0+c|}{\sqrt{a^2+b^2}}\) for \(a,b\) not both 0. Note that \(d\) is length of the line segment through point \((x_0,y_0)\) and perpendicular to the line. Apply the formula for the length of an altitude in triangles, parallelograms and trapezoids.
Examples
(1) The distance from point (-2, 3) to line 3x - 4y + 5 = 0 is 13/5 by abs(3*(-2)+(-4)*3+5)/(3**2+(-4)**2)**(1/2) ||.
(2) The distance from point (1, -5) to line y = -2x + 3 is \(\frac{6}{\sqrt{5}}\) by abs(2*1+(-5)-3)/(2**2+1**2)**(1/2).
(3) Calculate the area of a triangle with vertices at (-2, -5), (4, 1) and (0, 6). The side joining (-2, -5) and (4, 1) has slope 1,
length \(6\sqrt{2}\), and equation y = x - 5. The length of the altitude from (0, 6) to line x - y - 5 = 0 is \(\frac{11}{\sqrt{2}}\)
by abs(0*1+(-1)*6-5)/(1**2+1**2)**(1/2) ||. Thus, the area is \(\frac{1}{2}·6\sqrt{2}·\frac{11}{\sqrt{2}}\) = 33 square units.
Check pln;pg=[(-2,-5),(4,1),(0,6)] ||.
Intercepts The x-intercept is the x-coordinate of a point where the graph of an equation intersects the x-axis, and the y-intercept is the y-coordinate of a point at which the graph intersects y-axis. To find the x-intercept, set \(y=0\) and solve the equation for \(x\); to find the y-intercept, set \(x=0\) and solve the equation for \(y\).
Examples
(1) The x-intercept of the line \(y=2x-4\) is \(x=2\) and y-intercept is \(y=-4\). Check plt;2*x-4 ||.
(2) A line has the x-intercept \(x=-3\) and y-intercept \(y=4\) has an equation \(\frac{x}{-3}+\frac{y}{4}=1\).
Verify these results by letting \(x=0\) and \(y=0\). Check plt;4*(1+x/3) ||.
In general, a line of equation \(\frac{x}{a}+\frac{y}{b}=1\) has the x-intercept \(x=a\) and y-intercept \(y=b\) for \(a≠0\) and \(b≠0\).
Examples The x-intercept of the equation \(x^2+3xy+y^2-4y = 5\) is \(x^2=5⇒x=±\sqrt{5}\), and the y-intercept is \(y^2-4y+5=0⇒y=5\) or \(y=-1\). Check imf;x**2+3*x*y+y**2-4*y-5 || slv;y**2-4*y-5;y || slv;x**2-5;x ||.
Symmetry Determine the type of symmetry by checking if a pair of points is on a graph.
A graph is symmetric
about the x-axis if whenever \((a,b)\) is on the graph, so is \((a,-b)\).
A graph is symmetric about the y-axis if whenever \((a,b)\) is on the graph,
so is \((-a,b)\).
A graph is symmetric about the origin if whenever \((a,b)\) is on the graph, so is \((-a,-b)\).
A graph is symmetric about
the line \(y=x\) if whenever \((a,b)\) is on the graph, so is \((b,a)\).
Examples
(1) Check symmetry points pln;pt=[(4,6),(4,-6),(-4,6),(-4,-6),(6,4)] || pln;pt=[(2,5),(-2,5),(2,-5),(-2,-5),(5,2)] ||.
(2) The graph of \(x=y^2\) is symmetric about the x-axis. Both \((x,y)\) and \((x,-y)\) satisfy the equation by imf;x-y**2 ||.
(3) The graph \(y=x^4-2x^2-3\) is symmetric about the y-axis because whenever \((a,b)\) is on the graph, so is \((-a,b)\).
Check plt;x**4-2*x**2-3 ||.
(4) The graph of \(y=x^3-2x\) is symmetric about the origin because both \((x,y)\) and \((-x,-y)\) satisfy
the equation. Check plt;x**3-2*x ||.
(5) The graphs of \(y=e^x\) and \(y=\ln x\) is symmetric about the line \(y=x\) because whenever
\((a,b)\) is on the graph of \(y=e^x\), then \((b,a)\) is on the graph of \(y=\ln x\). Check plt;exp(x);log(x);x ||.
(6) plt;1/(x**2+1) || plt;x/(1+x**2) || plt;x**(-3)+x**(-1) || plt;exp(-x**2) || plt;(1+x)/(1-x);(1-x)/(1+x) ||.
3 Triangles and Polygons
Triangles is a polygon. For simplicity, we often place one vertex of a triangle at the origin, one at x-axis, and the third in any quadrant, so we can study the triangle by use of its coordinates such \((0, 0),(a,0),(b,c)\) for \(a,b,c\) some positive numbers. The area of the triangle is \(\frac{1}{2}ac\), and the perimeter is \(a+\sqrt{b^2+c^2}+\sqrt{(a-b)^2+c^2}\) by the distance formula.
Graph polygons using coordinates of vertices: || pln; pg=[(x1,y1), (x2,y2), (x3,y3), ...] ||
Graph a triangle or other polygons by the code pattern "pln; pg=[(x1,y1), (x2,y2), (x3,y3), ...]" in the coordinate plane, where
keyword "pg" (polygons) is to graph a polygon with known vertices, and the pairs of vertex coordinates are written in a square bracket.
We usually graph polygons in the first quadrant with one vertex at the origin.
Examples
(1) A triangle of vertices (0, 0), (5, 0) and (3, 4) has area 10 and perimeter \(10+\sqrt{20}\) by
pln;pg=[(0,0),(5,0),(3,4)] ||.
(2) For basic properties of triangles, use pln;pg=[(0,0),(6,0),(0,7)] || to display
a right triangle, pln;pg=[(0,0),(8,0),(4,4)] || to show an isosceles triangle, and pln;pg=[(0,0),(2,3.4641),(4,0)] || for an equilateral triangle.
(3) For quadrilateral, pln;pg=[(0,0),(6,0),(6,4),(0,4)] || shows a rectangle, pln;pg=[(0,0),(4,0),(4,4),(0,4)] || is a square,
pln;pg=[(0,0),(4,0),(6,4),(2,4)] || displays a parallelogram, pln;pg=[(0,0),(5,0),(5,4),(2,4)] || returns a trapezoid.
(4) These two polygons are not in standard position pln;pg=[(-2,0),(0,-5),(7,4)] || pln;pg=[(-2,-4),(4,-4),(4,2),(-2,2)] ||.
Centroid and orthocenter A median of a triangle is a line segment joining a vertex to the midpoint of the opposite side. Every triangle has exactly three medians, one from each vertex, and they all intersect each other at the triangle's centroid.
Examples
(1) For a triangle of three vertices (0, 0), (4, 0) (0, 6), the three midpoints are (2, 0), (0, 3), and (2, 3).
Verify it by pln;pg=[(0,0),(4,0),(0,6)];ln=[(0,0),(2,3)];ln=[(4,0),(0,3)];ln=[(0,6),(2,0)] ||.
(2) Plot the triangle of vertices (0, 0), (6, 0)
and (4, 6) and the three medians by pln;pg=[(0,0),(6,0),(4,6)];ln=[(4,6),(3,0)];ln=[(0,0),(5,3)];ln=[(6,0),(2,3)] ||.
Example proofs with analytic geometry
(1) Prove a line segment joining the midpoints of two sides of a
triangle is parallel to the third side. Let \((0, 0), (a, 0)\) and \((b, c)\) be the vertices of a triangle for \(a, b,c\) all positive.
The midpoint between vertices \((0,0),(b,c)\) is \((\frac{b}{2},\frac{c}{2})\), the midpoint between vertices \((a,0),(b,c)\) is
\((\frac{a+b}{2},\frac{c}{2})\), and the slope between these two midpoints \((\frac{b}{2},\frac{c}{2}), (\frac{a+b}{2},\frac{c}{2})\)
is 0. Since the slope of the third side joining \((0,0)\) and \((a,0)\) is also 0, thus the conclusion.
(2) Prove the length of the median to the hypotenuse of a right triangle is one half of the length of the hypotenuse.
Let \((0, 0), (a, 0)\) and \((0,b)\) be the vertices of a right triangle. The midpoint of the hypotenuse joining \((a,0)\) and
\((0,b)\) is \((\frac{a}{2},\frac{b}{2})\), the length of the median to hypotenuse is \(\frac{\sqrt{a^2+b^2}}{2}\), and the length of
the hypotenuse is \(\sqrt{a^2+b^2}\).
Examples Check the above examples by pln;pg=[(0,0),(5,0),(3,6)];ln=[(1.5,3),(4,3)] || pln;pg=[(-2,-1),(2,6),(3,-6)];ln=[(0,2.5),(2.5,0)] || pln;pg=[(0,0),(7,0),(0,5)];ln=[(0,0),(3.5,2.5)] ||.
An altitude of a triangle is a line segment through a vertex and perpendicular to opposite side (base). Every triangle has exactly three altitudes, one from each vertex, and they all intersect each other at the triangle's orthocenter.
Examples Let (0, 0), (6, 0), (4, 6) be the three vertices of a triangle. One altitude is the line segment joining (4,6) and (4,0). The slope of the side joining (0, 0) and (4, 6) is 3/2, so the equation of the line is \(y=\frac{3}{2}x\), and the equation of the corresponding altitude through (6, 0) is \(y=\frac{-2}{3}(x-6)\). They intersect at (24/13, 36/13) by eqs;y-3*x/2;y+2*(x-6)/3 ||. Similarly, the slope of the third side joining (6, 0) and (4, 6) is -3. So the equation of the line is \(y=-3(x-6)\), and the equation of the corresponding altitude through vertex (0, 0) is \(y=\frac{x}{3}\). They intersect at (27/5, 9/5). eqs;y-x/3;y+3*(x-6) ||. Graph the triangle and the three altitudes by pln;pg=[(0,0),(6,0),(4,6)];ln=[(4,6),(4,0)];ln=[(6,0),(24/13,36/13)];ln=[(0,0),(27/5,9/5)] ||.
Theorems and Properties for Triangles
Pythagorean theorem If a right triangle has hypotenuse \(c\) and legs \(a\) and \(b\), then \(c^2=a^2+b^2\).
Law of sines A triangle of three sizes \(a,b,c\) and corresponding angles \(A,B,C\) satisfies \(\frac{\sin A}{a} = \frac{\sin B}{b} =\frac{\sin C}{c}\).
Law of cosines A triangle of three sizes \(a,b,c\) and corresponding angles \(A,B,C\) satisfies \(a^2=b^2+c^2-2bc\cos A\), or \(b^2=a^2+c^2-2ac\cos B\), or \(c^2=a^2+b^2-2ab\cos C\).
Properties of similar triangles If \(\Delta ABC\) and \(\Delta A'B'C'\) are similar, then
(i) angles are equal
\(A=A', B=B', C=C'\), and
(ii) sides are proportional \(\frac{a'}{a}=\frac{b'}{b}=\frac{c'}{c}\).
Examples
(1) Show a triangle of vertices (0, 0), (5, 0) and (5, 6) is a right triangle. The lengths of the two legs are 5 and 6,
and the hypotenuse is the side joining (0, 0) and (5, 6), whose length is \(\sqrt{61}\). By Pythagorean theorem, it is a right triangle.
Check pln;pg=[(0,0),(5,0),(5,6)] ||.
(2) Find the third side of a triangle with two sides 3 and 7 and the angle between them is 60°.
Since 60° = π/2, by the law of cosine, the third side is \(\sqrt{37}\) from (3**2+7**2-2*3*7*cos(pi/3))**(1/2) ||
pln;pg=[(0,0),(7,0),(3/2,3*3**(1/2)/2)] ||.
(3) Find the perimeter and area of a triangle with vertices at (-2,-3), (6, -5) and (2, 4).
Calculate the lengths of the three sides using distance formula and they are \(2\sqrt{17},\sqrt{97},\sqrt{65}\) by (8**2+2**2)**(1/2) ||
(4**2+9**2)**(1/2) || (4**2+7**2)**(1/2) ||. So the perimeter is \(2\sqrt{17}+\sqrt{97}+\sqrt{65}\), which is about 26.157, and half perimeter
is about 13.08. Thus, the area by Heron's formula is about 32.02 ||. Check pln;pg=[(-2,-3),(6,-5),(2,4)] ||
(13.08*(13.08-2*17**0.5)*(13.08-97**0.5)*(13.08-65**0.5))**0.5 ||.
Perimeter and area Suppose the lengths of a triangle's sides are \(a,b,c\). Then its perimeter is \(p=a+b+c\), and area is \(\frac{1}{2}bh=\frac{1}{2}ab\sin\theta=\sqrt{s(s-a)(s-b)(s-c)}\) for \(s=\frac{p}{2}\). In the three formulas, \(h\) in the first one is the length of the altitude perpendicular to side \(b,θ\) in the second is the angle between sides \(a\) and \(b\), and \(s\) in the last is half perimeter. The last formula is called Heron's formula that calculates the area of a triangle by the lengths of its three sides only. There is no need to compute angles or altitudes for areas of triangles.
Examples
(1) The area of a triangle with three sides 6, 11, and 15 is \(20\sqrt{2}\) by Heron's formula since its half perimeter
is 16. Check (16*10*5*1)**(1/2) ||.
(2) If a triangle is equilateral of side \(a\), then its perimeter is \(p=3a\) and area is
\(\frac{\sqrt{3}}{4}a^2\). The perimeter of an equilateral triangle of side 4 is 12 and area is \(4\sqrt{3}\) by 3**(1/2)/4*4**2 ||.
4 Perimeter, Area and Volume
Perimeter
(1) Rectangle of width \(w\) and length \(l\) has perimeter \(2(w+l)\).
(2) Square of side \(w\)
has perimeter \(4w\).
(3) Circle of radius \(r\) has circumference \(2π r\).
(4) Sector of central angle \(θ\) radians and
radius \(r\) has arc length \(r\theta\).
Area
(1) Rectangle of width \(w\) and length \(l\) has area \(wl\).
(2) Square of width \(w\) has area
\(w^2\).
(3) Parallelogram of base \(b\) and height \(h\) has area \(bh\).
(4) Trapezoid pf base \(a\) top \(b\) and height \(h\) has area
\(\frac{1}{2}(a+b)h\).
(5) Circle of radius \(r\) has area \(π r^2\).
(6) Ellipse of axes \(a,b\) has area \(πab\).
(7) Sector of radius \(r\) and central angle \(θ\) radians has area \(\frac{1}{2}r^2\theta\).
Examples
(1) Find the diagonal, perimeter and area of a rectangle with vertices at (5, 4), (-5, 4), (-5, -3), and (5, -3).
The length of joining (5, 4) and (-5, 4) is 10, and the length of joining (-5, 4) and (-5, -3) is 7. So the perimeter is 34 and area 70.
Check pln;pg=[(5,4),(-5,4),(-5,-3),(5,-3)] ||. The length of a diagonal is \(\sqrt{149}\) by (10**2+7**2)**(1/2) ||.
(2) Show that a quadrilateral of vertices at (1, 1), (2, 4), (5, 6), and (4, 3) is a parallelogram, and find its perimeter and area.
To show it, calculate the slopes of the four sides and verify if opposite sides are parallel by their slopes. The slope of the side joining (1, 1)
and (2, 4) is 3, the slope of the side joining (5, 6) and (4, 3) is 3, the slope of the side joining (2, 4) and (5, 6) is 2/3, and the slope of
the side joining (1, 1) and (4, 3) is 2/3. Thus, the quadrilateral is a parallelogram. Check pln;pg=[(1,1),(2,4),(5,6),(4,3)].
The side joining (1, 1) and (2, 4) has length \(\sqrt{10}\) and the side joining (2, 4) and (5, 6) has length \(\sqrt{13}\), so the perimeter is
\(2\sqrt{10}+2\sqrt{13}\). The length of the altitude through from (4, 3) perpendicular to the side joining (1, 1) and (2, 4), whose equation is
\(y=3x-4\), is \(\frac{\sqrt{10}}{2}\) by abs(3*4+(-1)*3-4)/(3**2+1**2)**(1/2) || (recall the formula from a point to a line). Thus, the area is
\(\sqrt{10}·\frac{\sqrt{10}}{2}=5\) square units.
Volume
(1) Rectangular prism of dimension \(h\,w,l\) has volume \(wlh\). Cube
of width \(w\) has volume \(w^3\).
(2) Sphere of radius \(r\) has volume \(\frac{4}{3}π r^3\).
(3) Ellipsoid of axes \(a,b,c\)
has volume \(\frac{4}{3}πabc\).
(4) Right circular cylinder of height \(h\) and base radius \(r\) has volume \(π r^2h\).
(5) Right circular cone of height \(h\) and base radius \(r\) has volume \(\frac{1}{3}π r^2h\).
Examples
(1) The volume of a rectangular box of dimensions 2, 7, 11 is 2*7*11 ||.
(2) The volume of a sphere of
radius 3 is 4*pi*3**3/3 ||.
(3) The volume of a ellipsoid of axes 2, 3, 4 are 4*pi*2*3*4/3 ||.
(4) The volume of a right
circular cylinder of base radius 4 and height 9 is pi*4**2*9 ||.
(5) The volume of a right circular cone of base radius 3 and height 6
is pi*3**2*6/3 ||.
Area of regular polygons A regular polygon is a polygon that is equiangular and equilateral. The area of a regular polygon is given by \(\frac{1}{4}na^2\cot\frac{π}{n}\), where \(a\) is the length of one side and \(n≥3\) is the number of sides. For a regular polygon of \(n\) sides, each angle is \(θ=\frac{360°}{n}=\frac{2π}{n}\).
Examples
(1) If \(n\) = 3, each angle is 60° and the area is \(\frac{3}{4}a^2\cot\frac{π}{3}=\frac{\sqrt{3}}{4}a^2\) for
\(\cot\frac{π}{3}=\frac{\sqrt{3}}{3}\).
(2) If \(n\) = 4, each angle is 90° and the area is \(\frac{4}{4}a^2\cot\frac{π}{4}=a^2\)
because \(\cot\frac{π}{4}=1\).
(3) If \(n\) = 5, each angle is 36° and the area is \(\frac{5}{4}a^2\cot\frac{π}{5}=\frac{\sqrt{25
+10\sqrt{5}}}{4}a^2\) because \(\cot\frac{π}{5}=\frac{\sqrt{25+10\sqrt{5}}}{5}\).
Check cot(pi/3) || cot(pi/4) || cot(pi/5) ||.
(4) The area of a hexagon of side 1 is \(\frac{6}{4}1^2\cot\frac{π}{6}=\frac{3\sqrt{3}}{2}\) by 6/4*cot(pi/6) ||.
(5) The area of an heptagon of side 3 is \(\frac{7}{4}3^2\cot\frac{π}{7}=\)\(\frac{63}{4}\cot\frac{π}{7}\) ||.
(6) The area of an octagon of side 2 is \(\frac{8}{4}2^2\cot\frac{π}{8}=8(1+\sqrt{2})\) by 8*cot(pi/8) ||.
Area of general polygons The formula based on Green's theorem for computing the area of a polygon on the coordinate plane with given vertices \((x_1,x_2),(x_2,y_2),\cdots,(x_n,y_n)\) is \(\frac{1}{2}\displaystyle\sum_{i=1}^n(x_iy_{i+1}-x_{i+1}y_i)\).
Examples
(1) The area of the triangle with three vertices (0, 0), (5, 0), (4, 7) is 17.5 by the formula
0.5[0(0)-0(5) + 5(7)-0(4) + 0(7)-0(4)]. Check the graph pln;pg=[(0,0),(5,0),(4,7)] ||.
(2) The area of a quadrilateral with
vertices (-5,-4), (2,-6), (2, 6), (-2, 4) is 0.5[38 + 24 + 20 - 28] = 27. Check pln;pg=[(-5,-4),(2,-6),(2,6),(-2,4)] ||.