III Functions
Usage Overview
Functions | Brief Usage Descriptions and Examples |
---|---|
Examples log(2)>2 ||e(3)>log(3) || 2**E>E**2 || (-x)**3-(-x)**2==x**3-x**2 || -(-x)**(3/5)==x**(3/5) || log(2.3)>log(3.2) || exp(5)>exp(6) || 8**9>9**8 || 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) || plt;1/(x+2) || plt;x**(3/4);itv=(0,10) || plt;x**2-x-6;pt=(0.5,-6.25) || pc2;-t**2;t || plt;2**x;2**(-x);x**2 || plt;3**x;4**x;5**x || plt;log(x);log(-x);log(1/x) || plt;log(x)/log(3);3**x || plt;log(x)/log(3/4);(3/4)**x ||. |
Table of Contents
1 Definition, Domain and Range
Function definition A function \(f\) is a rule that assigns exactly one element \(y\) in a set \(Y\) to each element \(x\) in a set \(X\). The set \(X\) is the domain of \(f\), and the set of all values of \(y=f(x)\) in \(Y\) is the range of \(f\). We refer to \(x\) as the independent variable and \(y\) the dependent variable. Note that functions may not have formulas. Functions can be represented by graphs, formulas, tables, and words.
Domain and range If a function is given without a description of domain, we usually assume the domain is the largest set of real numbers for which the function yields a real number. For example, given \(f(x)=x-3x^2,g(x) = \sqrt{x}\), \( w(x) = \frac{3}{x-4}\), we assume the domain of \(f\) is all real numbers, the domain of \(g\) is all non-negative numbers, and the domain of \(w\) is all real numbers but 4.
The domain and range of a function may be arbitrary. They can be a set of numbers or any objects. It is usually more difficult to determine ranges of functions. Some functions of special forms such as \(|x|,\sqrt{x},x^n,x^{\frac{1}{n}}\) are nonnegative for \(n\) an even number. If possible, use the graph of a function to help determine its domain and range.
Plot explicit function y = f(x): [plt; f(x)], [plt; f(x); g(x)]; [plt; f(x); g(x); h(x); itv=(a,b)]
Use "plt; f(x)" to plot pairs of points (c, f(c)) of f on the plane, for c in the domain of f and f(c) in the range of f. In a similar fashion,
plot both f(x) and g(x), or three functions f(x), g(x), and h(x) on the same plane with a given interval (a, b).
Examples
(1) The range of \(y=2-x^2≤2\) since \(-x^2≤0\). Check the graph by plt;1-x**2 ||.
(2) The range of \(y=|2x+3|\) is \(y≥0\). Check plt;abs(2*x+3) ||.
(3) The domain of \(y=\sqrt{9-x^2}\) is \(0≤y≤3\). Check plt;(9-x**2)**(1/2) ||.
Attention Two functions are equivalent if their domains, ranges and assignment rules are the same. The function \(f(x)=\frac{x^2-4}{x-2}\) and \(g(x)=x+2\) are not the same because the domains of \(f\) and \(g\) are not equivalent. The domain of \(f\) is \(x≠2\), and the domain of \(g\) is all real numbers.
Examples
(1) The domain of \(y=\frac{3x}{2x-4}\) is \(x≠2\) and the range of \(y\) is \(y≠\frac{3}{2}\). If
\(y=\frac{3}{2}=\frac{3x}{2(x-2)}⇒\frac{x}{x-2}=1\), which is impossible. Check plt;3*x/(2*x-4) ||.
The domain of \(y=\frac{4}{x+3}\) is \(x≠-3\) and range is \(y≠0\). The domain of \(y=\frac{1-x}{1+x}\) is \(x≠-1\) and range is
\(y≠-1\).
(2) The domain of \(y=\frac{8}{x^2-9}\) is \(x≠±3\). To determine its range, solve for
\(x=±\sqrt{\frac{8}{y}+9}⇒\frac{8}{y}+9≥0\)\(⇒\frac{8+9y}{y}≥0⇒\) case I \(y>0,8+9y≥0⇒y>0\), or case II
\(y< 0,8+9y≤0⇒y≤\frac{-8}{9}\). Thus, the range is \(y>0\) or \(y≤-\frac{8}{9}\). Check plt;8/(x**2-9) || slv;y-8/(x**2-9);x ||.
The domain of \(y=\frac{1}{x^2-4x-21}\) is \(x≠7\) and \(x≠-3\), and the range is \(y>0\) or \(y<-1\). Check plt;25/(x**2-4*x-21)
|| slv;y-25/(x**2-4*x-21);x ||.
(3) The domain of \(y=\frac{x}{\sqrt{1-x^2}}\) is \(-1< x< 1\) and the range is all real numbers, since
\(x^2=\frac{y^2}{1+y^2}\). Check the result by plt;x/(1-x**2)**(1/2) || slv;y-x/(1-x**2)**(1/2);x ||. A similar example is the domain of
\(y=\frac{1}{\sqrt{4-x^2}}\) is \(-2< x< 2\) and the range is \(y≠0\) since \(x^2=4-\frac{1}{y^2}\). Check plt;1/(4-x**2)**(1/2) ||.
(4)
The domain of \(y=x+|x|\) is all real numbers, and the range is \(y≥0\) because if \(x>0,y=2x\) and if \(x< 0,y=0\). Check plt;x+abs(x) ||.
Similarly, the domain of \(y=\frac{|x-1|}{x-1}\) is \(x≠1\) and the range is the set {1, -1} because if \(x>1,y=1\) and if \(x< 1, y=-1\).
(5) The domain of \(y=\frac{x+1}{28-13x-6x^2}\) is all \(x\) such that \(28-13x-6x^2=(2x+7)(3x-4)≠0\), or \(x≠-\frac{7}{2}\) and \(x≠\frac{4}{3}\). Check slv;28-13*x-6*x**2;x ||.
(6) Find the domain and range of \(\sqrt{x^2-x-2}\). The domain is all \(x\) satisfying \(x^2-x-2≥0⇒x≥2\) or \(x≤-1\). The range of \(y\) is \(y≥0\). Check plt;(x**2-x-2)**(1/2) || slv;x**2-x-2>=0;x ||.
(7) The domain of \(y=1-x^2\) is all real numbers, and range of \(y\) is \(y≤1\). Check plt;1-x**2 ||.
Operations among general functions Simplify operations among functions and their variables such as f(x) + g(x), xf(x)g(x), h(y)² - h(y) + 2, f(x)/x + g(y)/y, f(x)g(x), and so on.
Examples
(1) Get the result of f(x) + 3f(x) - 4 by f(x)+3*f(x)-4 ||.
(2) Factor f(x)² - 2f(x) - 3 by fac;f(x)**2-2*f(x)-3 ||.
(3) Expand (2yf(x) - 3xg(y))² by epd;(2*y*f(x)-3*x*g(y))**2 ||.
(4) Solve 6f(x)³ + 25f(x)² - 11f(x) - 60 for f(x).
Let y = f(x). Then it becomes solving 6y³ + 25y² - 11y - 60 for y by slv;6*y**3+25*y**2-11*y-60;y ||, and y = f(x) = {-4, -5/3, 3/2}.
2 Function Graphs
Graphs of functions: [plt; f(x);pt=(a,b);itv=(c,d)], [pc2; x(t); y(t)], [imf; f(x,y)-c]
We can visualize the numerical values and geometric features of a function \(f\) by its graph, which is obtained by plotting the points \((a, f(a))\) over its domain. The graph of \(f\) is the set of all possible points \((a, f(a))\) satisfying \(y=f(x)\). Be aware that not every curve on the plane is graph of a function. Curves that fails the vertical line test are not graphs of functions.
We devised three graph utilities for plane curves, with operation codes "plt", "pc2", and "imf". Code "plt" is used to plot function graphs, 'pc2' to plot curves for parametric equations, and 'imf' to plot graphs of implicit functions. You will see each of them in different chapters, and learn to choose which utility lets you better visualize all graph features of functions and equations. In this section, we mainly focus on "plt" for plotting function graphs.
Plot up to three distinct functions at once. The default interval for your graphs is (-10, 10), you change it to suit your needs, but it cannot be beyond the interval (-20, 20). In case you wish to plot functions outside of this restriction, you can rescale your function values by multiplying a factor between 0 and 1, so you can still view their overall geometric features within the restriction. Refer to the section of "Function Transformation" for more details on scaling.
In addition, you can add a few points to a graph for emphasizing the importance of the points (tangency points, or critical points) by the keyword "pt".
Examples plt;abs(x-2) || shows the graph of \(y=|x-2|\). Check these examples plt;3-x**2;(x+2)**2 || plt;(abs(x-2)-1)**(1/2) || plt;x**(2/3);x**(-1/3); x**(1/3) || plt;log(x);x;exp(x) || plt;1/x;x**0.5;itv=(0,9) || plt;x**3/3-x**2/2-x+1 || plt;1/x**2;x/(1+x**2)**0.5 || plt;abs(x);abs(x-2); abs(x+2) || plt;abs(x+2);abs(x+2)-3;abs(x+2)+3 || plt;abs(2-3*x);abs(2-3*x)-2;abs(2-3*x)+2 || plt;abs(-3*x);abs(2-3*x);abs(4-3*x) || plt;x**1.5;(2*x)**1.5;(0.5*x)**1.5;itv=(0,9) || plt;x**0.5;-x**0.5;(-x)**0.5 || plt;x**(2/3);-x**(2/3);(-x)**(2/3) ||.
Examples plt;x**2/(x-3) || only shows the bottom portion of the graph of \(y=\frac{x^2}{x-3}\). Enter plt;0.2*x**2/(x-3) ||, and you'll see the entire graph.
Examples You may notice that the graph of \(f(x)=x^{\frac{2}{3}}\) by plt;x**(2/3) || only shows the positive portion (right-hand side) of \(x\), but the domain of \(f\) covers both positive and negative values. Use "pc2" to obtain the whole graphs of the function by pc2;t**3;t**2 ||. Similar graphs can be shown by pc2;-t**3;t || pc2;t**3;t || pc2;t**2;t**3 || pc2;(t-3)**3;(2*t-7)**2 ||. Refer to parametric equations for more information.
Examples The graph of \(x=y^2\) fails the vertical line test, because it is not a function graph, and cannot be shown by the "plt" module. The function \(y\) is defined implicitly in the equation \(x-y^2=0\), so you can view the graph by implicit plotting code imf;x-y**2 ||. Try more examples of this kind imf;2*x-3*y**2 || imf;x**2-3*y**3 || imf;x**3-3*y**2+2 || imf;x**2-2*y**2-3 || imf;x**2-x*y+2*y**2-x+y-2 ||. Notice that you need to place variable \(x\) in front of function \(y\) when plotting implicit graphs.
Function value, intercept and intersection You may not only overview numerical function values, but also spot a few import locations on your graphs. Substituting a value of \(x\) into the formula of \(f(x)\), you obtain the corresponding value of \(y=f(x)\).
Examples If \(f(x)=1-2x-3x^2, f(0) = 1, f(-1)=0, f(1)=-4\).
(1) x-intercept: Let \(y=0\) and solve \(f(x)=0\) for \(x\).
If \(x=c\) exists such that \(f(c)=0\), \(c\) is called the x-intercept, the point where the graph intersects the x-axis. Check slv;1-2*x-3*x**2;x ||
(2) y-intercept: Let \(x=0\) and solve \(f(0) = y\) for \(y\). If \(y=b\) exists such that \(f(0) = b\), \(b\) is called the y-intercept, the point where the graph
intersects the y-axis.
(3) Intersection of curves: To find the intersection points of curves \(y=f(x)\) and \(y=g(x)\), solve the
equation \(f(x)=g(x)\) for \(x\) and \(y\).
Examples
(1) Verify if (1.2, 2.5) is on the graph of \(y=x^4-3x^2+5\) by 1.2**4-3*1.2**2+5 ||. It is 2.7536, so the point (1.2, 2.5)
is not on the graph.
(2) The x-intercept of \(y=\frac{4+2x}{1-3x}\) is \(\frac{4+2x}{1-3x}=0⇒x=-2\) and y-intercept is \(y=4\) if \(x=0\).
|| plt;(4+2*x)/(1-3*x) ||.
(3) Determine the point(s) of intersection between \(y=x^2-3\) and \(y=x^3-2x^2-3x+6\). Solve \(x^3-2x^2-3x+6=x^2-3⇒(x-3)(x^2-3)=0 ⇒x=3\) or \(x=±\sqrt{3}\). Thus, \(x=3,y=6\) and \(x=±\sqrt{3},y=0\). Check plt;x**3-2*x**2-3*x+6;x**2-3 || slv;x**3-3*x**2-3*x+9;x ||.
3 Monotonicity, Even and Odd, and Functions of Special Forms
Increasing and decreasing functions A function \(f\) is increasing on \((a,b)\) if \(f(x_1) > f(x_2)\) for every pair of numbers \(x_1,x_2∈ (a, b)\) and \(x_1 > x_2\). A function \(f\) is decreasing on \((a,b)\) if \(f(x_1) < f(x_2)\) for every pair of numbers \(x_1,x_2∈ (a,b)\) and \(x_1 >x_2\).
Examples
(1) The function \(y=x^3+x\) is increasing for all \(x\). Check plt;x**3+x ||. Try more examples of increasing functions plt;x/(x**2+1)**(1/2) || plt;x**5+3 || plt;2x-7 || plt;x**(1/2)+3 ||.
(2) Check the decreasing function \(\frac{2}{x-3}\) by plt;2/(x-3) ||. Check other examples of decreasing functions plt;-x**3-5 || plt;1/x || plt;3-x || plt;-x**(1/4) ||.
(3) The function \(y=x^4+x^2\) is increasing for \(x>0\) and decreasing for \(x≤0\). Check plt;x**4+x**2 ||.
Even and odd Suppose that both \(x\) and \(-x\) lie in the domain of a function \(f\). Then \(f(x)\) is even if \(f(-x) = f(x)\), and \(f(x)\) is odd if \(f(-x) = -f(x)\).
The graph of an even function is symmetric about the y-axis if and only if both points \((a, f(a))\) and \((-a, f(a))\) lie on the graph of \(f\). The graph of an odd function is symmetric about the origin (0, 0) if and only if both points \((a, f(a))\) and \((-a, -f(a))\) lie on the graph of \(f\).
The sum of two even functions is even; the sum of two odd functions is odd; the sum of an even and an odd function is neither even nor odd. A constant multiple of an even (odd) function is even (odd). In general, a linear combination of even (odd) functions is even (odd).
For power functions \(y = x^k\) with an integer exponent, even powers (\(x^0, x^2, x^{-4}, x^{-6}\)) are even functions, whereas odd powers (\(x, x^3, x^5, x^{-1}, x^{-7}\)) are odd functions.
The only function that is both even and odd is that \(f(x) = 0\), because \(f(x) = f(-x) = -f(x)\)\(⇒ f(x) = 0\). If \(f(0)\) is defined and \(f\) is odd, then \(f(0) = 0\).
Examples
(1) Check some even functions plt;3*x**2 || plt;5*x**4 || plt;3*x**(-2) || plt;1-2*x**2 || plt;2/(x**2-3) || plt;2*x**2-x**4 ||.
(2) Check some examples of odd functions plt;x**3+x || plt;5*x/(x**2+1) || plt;x/(x**2-3) || plt;x**(-3)+x**(-1) || plt;1/x ||.
(3) Check some functions are neither even nor odd. plt;x**2+x || plt;x**2-x**3 || plt;x**3-5 ||.
We can use a function \(f\) to construct an even function by \(E(x) = f(x) + f(-x)\) and odd function by \(O(x) = f(x) - f(-x)\), so any function can be expressed as the sum of an even and odd functions since \(f(x) = \frac{E(x) + O(x)}{2}\).
Examples \(f(x)=3x^2-x^3,E(x)=3x^2-x^3+3(-x)^2-(-x)^3=6x^2,O(x)=-2x^3\) and \(\frac{E(x)+O(x)}{2}=3x^2-x^3=f(x)\). Check plt;3*x**2-x**3;6*x**2;-2*x**3 ||.
Piecewise functions are defined by different formulas on different subsets of domains. These are common piecewise-defined functions, \(|x|=\begin{cases}x x≥0\\ -x x< 0 \end{cases}\), \(H(x)=\begin{cases}1 x≥0\\ 0 x< 0\end{cases}\), and sign function sign\((x)=\begin{cases}-1 x < 0\\ 0 x=0\\1 x>0\end{cases}\).
The domain and range of \(|x|\) are all real numbers. The domain of \(H(x)\) is all real numbers and the range is {0, 1}. The domain of the sign function is \(x∈R\) and the range is the set {-1, 0, 1}. When evaluating absolute values functions, equations, or inequalities, we can express them in piecewise form, and then work on each piece separately.
Examples
(1) Write \(f(x)=|1-x|+|x|\) as (1) \(f(x)=1-2x\) for \(x < 0\), (2) \(f(x)= 1\) for \(0 ≤x< 1\), and (3) \(f(x)=2x-1\) for \(x≥1\). Check its graph plt;abs(1-x)+abs(x) ||.
(2) Try more examples plt;x*abs(x) || plt;x/abs(x) || sign(-3) || sign(0) || sign(5) ||.
The greatest integer function denoted as \(f(x)=⌊x⌋\), is defined as the greatest integer less than or equal to \(x\). It is also called integer floor function. The greatest and least integer functions are piecewise functions. The greatest integer function \(f(x)=⌊x⌋=n\) if and only if \(n≤ x < n+1\) for \(n\) a unique integer.
Examples
(1) ⌊0.6⌋ = 0, ⌊-0.7⌋ = -1, and ⌊1.1⌋ = 1 by floor(0.6) || floor(-0.7) || floor(1.1) ||.
(2) If \(x∈[-1,0)\), then \(f(x)=-1\); if \(x∈[0,1)\), \(f(x)=0\); if \(x∈[1,2), f(x)=1\).
(3) Check floor(-0.5) || floor(1.6) || floor (0.7) || floor(3.8) || floor(10.2) || floor(-19.8) || floor(3/8) || floor(-5/3) || floor(23) || floor(-61) ||.
The least integer function denoted as \(f(x)=⌈x⌉\), is defined as the smallest integer greater than or equal to \(x\). It is also called integer ceiling function. The least integer function \(f(x)=⌈x⌉=n\) if and only if \(n-1< x ≤ n\) for \(n\) a unique integer.
Examples
(1) ⌈0.5⌉ = 1, ⌈-0.2⌉ = 0, and ⌈1.9⌉ = 2 by ceiling(0.5) || ceiling(-0.2) || ceiling(1.9) ||.
(2) If \(x∈(-1,0],f(x)=0\); if \( x∈(0,1]\), \(f(x)=1\); if \(x∈(1,2], f(x)=2\).
(3) Check ceiling(0.2) || ceiling(-0.6) || ceiling(-2.4) || ceiling(6.9) || ceiling(-19.1) || ceiling(52.8) || ceiling(9/4) || ceiling(-45/6) || ceiling(5) || ceiling(17) ||.
Examples If \(⌊x⌋ = ⌈x⌉\), then \(x=0,\pm1,\pm2,\cdots\) is an integer. Check ceiling(1.5)-floor(1.5) || ceiling(-2.5)-floor(-2.5) || ceiling(0.3)-floor(0.3) || ceiling(-0.8)-floor(-0.8) || ceiling(0)-floor(0) || ceiling(6)-floor(6) ||.
4 Function Transformation
Function transformation creates a new function from an old, just as function operations do such as \(f(x)±g(x)\), \(f(x)·g(x),\frac{f(x)}{g(x)},f(x)^{g(x)}\) and \(f[g(x)]\).
Translation or shifting Let \(f\) be a function and \(a > 0\) be a constant. Then
the graph of \(y=f(x)+a\) shifts the graph of \(f\) up \(a\) units;
the graph of \(y=f(x)-a\) shifts the graph of \(f\) down \(a\) units;
the graph of \(y=f(x+a)\) shifts the graph of \(f\) left \(a\) units;
the graph of \(y=f(x-a)\) shifts the graph of \(f\) right \(a\) units.
These rules can be combined with other transformations to make more complicated function transformations and functions.
Examples
(1) Check vertical translation of \(x^2\) by plt;x**2;x**2-4;x**2+3 ||.
(2) Check horizontal translations plt;x**2;(x-2)**2;(x+4)**2 ||.
(3) Try more examples of function translation plt;(x-2)**2+3;(x+2)**2-3 || plt;x**(1/2);x**(1/2)+3;x**(1/2)-4 || plt;x**(1/2);(x-2)**(1/2);(x+2)**(1/2) || plt;(x-2)**(1/2)+3;(x+2)**(1/2)-3 || plt;x**4-4*x**2;x**4-4*x**2+3;x**4-4*x**2-4 || plt;x**3-4*x;(x+1)**3-4*(x+1);(x-2)**3-4*(x-2) || plt;x**3-4*x;x**3-4*x+2;x**3-4*x-3 ||.
Scaling and reflecting Let \(f\) be a function and \(c > 1\) be a constant. Then
the graph of \(y=cf(x)\) stretches the graph of \(f\) vertically by a factor of \(c\);
the graph of \(y=\frac{1}{c}f(x)\) compresses the graph of \(f\) vertically by a factor of \(c\);
the graph of \(y=f(cx)\) compresses the graph of \(f\) horizontally by a factor of \(c\);
the graph of \(y=f(\frac{1}{c}x)\) stretch the graph of \(f\) horizontally by a factor of \(c\).
In particular, if \(c=-1,-f(x)\) neither stretches nor compresses but reflects the graph of \(f\) across the x-axis; \(f(-x)\) reflects the graph of \(f\) across the y-axis.
If the scaling factor \(c< 0, cf(x)\) not only scales the graph \(f\) vertically by factor \(|c|\), but also reflects the graph \(f\) about the x-axis. In a similar fashion, \(f(cx)\) not only scales the graph \(f\) horizontally by a factor \(|c|\), but also reflects the graph \(f\) about the y-axis.
Examples
(1) Let \(f(x)=\frac{4x}{1+x^2}\). Then the graph of \(y=\frac{12x}{1+x^2}\) vertically stretches the graph of \(f\) by a factor of 3, and the graph of \(y=\frac{x}{1+x^2}\) vertically compresses the graph of \(f\) by a factor of 4. Check horizontal and vertical scaling effects by plt;4*x/(1+x**2);12*x/(1+x**2);x/(1+x**2) || plt;4*x/(1+x**2);8*x/(1+4*x**2);x/(1+0.0625*x**2) ||.
(2) Let \(f(x)=\frac{1}{x}\). Check the effects of vertically scaling the graph of \(f\) by factors of 3 and 1/4 by plt;1/x;3/x;1/(4*x) ||. Check the horizontal scaling effects by plt;x**2;4*x**2;x**2/4 ||. Check the vertical scaling effect by plt;x**(1/2);3*x**(1/2);x**(1/2)/2 ||, and horizontal scaling effects by plt;x**(1/2);(2*x)**(1/2);(x/3)**(1/2) ||.
(3) Let \(f(x)=\sqrt{x}\). Then the graph of \(y=-\sqrt{x}\) reflects the graph of \(f\) across the x-axis, and the graph of \(y=-2\sqrt{x}\) vertically stretches the graph of \(f\) by a factor of 2 and reflects it across the x-axis. Check plt;x**(1/2);-x**(1/2);-2*x**(1/2) ||.
(4) The graph \(y=\sqrt{-x}\) reflects the graph of \(f\) across the y-axis, and the graph of \(y=\sqrt{-\frac{x}{2}}\) horizontally stretches the graph of \(f\) by a factor of 2 and reflects of \(f\) across the y-axis. Check plt;x**(1/2);(-x)**(1/2);(-x/2)**(1/2) ||.
(5) Try more examples of scaling and reflecting graphs by plt;1/(1-x**2)**(1/2);-3/(1-x**2)**(1/2);1/(2*(1-x**2)**(1/2)) || plt;1/(1-x**2)**(1/2);1/(1-2*x**2)**(1/2);1/(2*(1-0.25*x**2)**(1/2)) || plt;4*x-x**3;2*(4*x-x**3);(4*x-x**3)/3 || plt;4*x-x**3;2*x-x**3/8;8*x-8*x**3 ||.
The rules of shifting, scaling, and reflecting a function \(f\) can be combined to form a more complicated function.
Examples \(y=af(x)+d\), whose graph can be obtained by vertically scaling the graph of \(f\) by a factor \(|a|\) (followed by reflecting the graph of \(y=af(x)\) about the x-axis if \(a< 0\)), and then vertically shifting the graph of \(y=af(x)\) by \(|d|\) units.
Examples The graph of \(y=cf(bx+a)+d=cf[b(x+\frac{a}{b})]+d\) can be obtained from the graph of \(y=f(x)\) in the following steps.
(i)
Scale the graph of \(y=f(x)\) horizontally by a factor \(|b|\) to obtain the graph of \(y=f(bx)\) (followed by reflecting the graph \(y=f(bx)\) about
the y-axis if \(b< 0)\).
(ii) Shift the graph of \(y=f(bx)\) horizontally by \(|\frac{a}{b}|\) units to obtain the graph of \(y=f(bx+a)\).
(iii) Scale the graph of \(y=f(bx+a)\) vertically by a factor of \(|c|\) to obtain the graph of \(y=cf(bx+a)\) (followed by reflecting the
graph of \(y=cf(bx+a)\) about the x-axis if \(c< 0\)).
(iv) Shift the graph of \(y=cf(bx+a)\) vertically by \(|d|\) units to obtain the
graph of \(y=cf(bx+a)+d\).
Examples
(1) Let \(f(x)=\sqrt{x}\). Then the graph of \(y=3\sqrt{2x+5}-4\) can be obtained by horizontally compressing the graph of \(f\) by a factor 2, horizontally shifting the resulting graph to the left 2.5 units, then vertically stretching it by a factor 3, and finally shifting it down 4 units. Check plt;x**(1/2);3*(2*x+5)**(1/2)-4 ||.
(2) Let \(f(x)=x^2\). Then the graph of \(y=-\frac{(2x-3)^2}{4}+5\) can obtained by horizontally compressing the graph of \(f\) by a factor 2, horizontally shifting it to the right 1.5 units, vertically compressing it by a factor 4, reflecting it across the x-axis, and finally shifting it up 5 units. Check plt;x**2;-(2*x-3)**2/4+5 ||.
Symmetry and reflection Let \(f(x,y)=0\) be an equation of \(x\) and \(y\). Then
(1) A graph of the equation is symmetric about the y-axis if and only if both points (\(x,y\)) and (\(-x, y\)) are on the graph. This means the graph is unchanged when reflected about the y-axis.
(2) A graph of the equation is symmetric about the x-axis if and only if both points (\(x,y\)) and (\(x, -y\)) are on the graph. This means the graph is unchanged when reflected about the x-axis.
(3) A graph of an equation is symmetric about the origin if and only if both points (\(x,y\)) and (\(-x, -y\)) are on the graph. This means the graph is unchanged when rotated 180° about the origin.
If the graph has the first two symmetries, it also has the third symmetry. It is easy to see if \((x, y)\) on a graph, \((x, -y)\) is on the graph because the graph is symmetric about the x-axis, and thus \((-x, -y)\) is on the graph since the graph is also symmetric about the y-axis. However, the converse it not true.
Examples The graphs of \(4x^2+9y^2=36,x^2-2y^2=3\) have the three types of symmetry. Check their graphs by imf;4*x**2+9*y**2-36 || imf;x**2-2*y**2-3 ||.
Examples \(y=x^3\) is symmetric about the origin, so both (1, 1) and (-1, -1) are on the graph, but neither (1, -1) nor (-1, 1) is on the graph. Thus, the graph is neither symmetric about the x-axis, nor the y-axis. Check plt;x**3 ||.
A function \(f\) is symmetric about a vertical line \(x=a\) if \(f(a+x)=f(a-x)\), or if \((a+x,y)\) is on the graph of \(f\), the point \((a-x,y)\) is also on the graph of \(f\). In particular, if \(a=0\), then \(f\) is symmetric about the y-axis.
Examples \(f(x)=3(x+2)^2-4\) is symmetric about the vertical line \(x=-2\) since both points (-2+1, -2) and (-2-1, -2) on the graph of \(f\). Check plt;3*(x+2)**2-4 ||. The graphs passes through (-1, -2) and (-3, -2).
Reflection The reflection of a graph of an equation \(f(x,y)=0\) can be viewed as scaling the graph by a factor of -1, either on \(x\), or \(y\), or both. Thus, the graph of a function \(y=-f(x)\) is the reflection of the graph of \(y=f(x)\) about the x-axis; the graph of \(y=f(-x)\) is the reflection of the graph of \(y=f(x)\) about the y-axis; the graph of \(y=-f(-x)\) is the reflection of the graph of \(y=f(x)\) about the origin.
Examples If \(f(x)=x+\sqrt{x}\), then the graph of \(y=-x-\sqrt{x}\) reflects the graph of \(f\) about the x-axis, the graph of \(y=-x+\sqrt{-x}\) reflects of \(f\) about the y-axis, and \(y=-(-x+\sqrt{-x})\)\(=x-\sqrt{-x}\) reflects the graph of \(f\) about the origin. Check plt;x+x**(1/2);-x-x**(1/2) || plt;x+x**(1/2);-x+(-x)**(1/2) || plt;x+x**(1/2);x-(-x)**(1/2) ||.
5 Composite and Inverse Functions
Composite functions Given two functions \(f\) and \(g\), the composite \(f◦g\) is defined as \((f◦g)(x) = f[g(x)]\) for all \(x\) in the domain of the inner function \(g\) and \(g(x)\) in the domain of the outer function \(f\). To calculate the composite \(f[g(x)]\), first compute the inner function \(g(x)\), and substitute it into the formula of outer \(f\).
Examples
(1) Let \(g(x) = 2x^2 + x\) and \(f(x) = 3x^3 - 5x\). Then \(f[g(x)] = 3(2x^2 + x)^3 - 5(2x^2 + x)\). Check epd;3*(2*x**2 +x)**3-5*(2*x**2+x) || and \(g[f(x)] = 2(3x^3 - 5x)^2 + (3x^3 - 5x)\) by epd;2*(3*x**3-5*x)**2+3*x**3-5*x ||.
(2) The function \(\frac{1}{(3x - 2)^2}\) can be viewed as the composite \(f[g(x)]\) for \(g(x) = 3x - 2\) and \(f(x) = \frac{1}{x^2}\). Check their graphs plt;2*x**2+x;3*x**3-5*x;3*(2*x**2+x)**3-5*(2*x**2+x) || plt;3*x-2;1/x**2;1/(3*x-2)**2 ||.
(3) The function \((x^2 + 1)^{\frac{3}{2}}\) can be view as \(g[f(x)]\) for \(f(x) = x^2 + 1\) and \(g(x) = x^{\frac{3}{2}}\). Check plt;x**2+1;x**(3/2);(x**2+1)**(3/2) ||.
One-to-one A function \(y=f(x)\) is one-to-one if for every value \(y=c\) in the range of \(f(x)\) there is at most one \(x\) in the domain of \(f\) such that \(f(x)=c\). In other words, a function \(f\) is one-to-one if and only if \(f(a)=f(b)\) implies \(a=b\), or \(f(a)≠ f(b)\) implies \(a≠ b\). A function \(f\) is one-to-one if and only if every horizontal line intersects the graph of \(f\) at most one point.
A power function with positive integer exponent \(y=x^n\) passes the test when \(n\) is odd, but fails when \(n\) is even. We can make a function one-to-one by restricting its domain. For example, \(f(x)=x^2\) is one-to-one for \(x≥ 0\) and \(f\) is also one-to-one for \(x< 0\).
Inverse A function \(y=f(x)\) has an inverse \(f^{-1}\) if and only if \(f\) is one-to-one. The domain of \(f\) is the range of \(f^{-1}\), and the range of \(f\) is the domain of \(f^{-1}\). If \(f^{-1}\) exists, it is unique, and \(f\) and \(f^{-1}\) are inverse of one another.
The composition \(f[f^{-1}(y)]=y\) for all \(y\) in the range of \(f\), but \(f^{-1}[f(x)]=x\) only when \(x\) is in the restricted domain of \(f\), where \(f\) has an inverse \(f^{-1}\).
Examples
(1) \(f^{-1}(x)=\sqrt{x}\) is an inverse of \(f(x)=x^2\) for \(x≥0\). So \(f(f^{-1}(x)))=x\), but \(f^{-1}(f(-2))≠-2\)
because -2 is not in the restricted domain of \(x≥0\).
(2) \(\sin^{-1}[\sin(π)] ≠π\) since \(π\) is not in the restricted domain
\([-\frac{π}{2},\frac{π}{2}]\) where \(\sin x\) has an inverse.
To find the inverse function of \(f\), first solve the equation \(y=f(x)\) for \(x=f^{-1}(y)\) in terms of \(y\), then by convention write the inverse as \(y=f^{-1}(x)\) by interchanging the role of \(x\) and \(y\).
Examples
(1) Find the inverse of \(y=f(x)=\frac{x-1}{x+1}\). First solve for \(x\). Since \(y(x+1)=x-1⇒x(1-y)=y+1\)\(⇒
x=\frac{1+y}{1-y}\), and check slv;y-(x-1)/(x+1);x ||. Then interchange \(x\) and \(y\), we have the inverse \(y=f^{-1}(x)=\frac{1+x}{1-x}\). Verify the
identities by substituting \(f^{-1}(x)\) into \(f(x)\) to get the composite \(f[f^{-1}(x)]=\frac{f^{-1}(x)-1}{f^{-1}(x)+1}=x\), and by substituting
\(f(x)\) into \(f^{-1}(x)\) to have the composite \(f^{-1}[f(x)]=\frac{1+f(x)}{1-f(x)}=x\). Check their graphs by plt;(x-1)/(x+1);(1+x)/(1-x) ||.
(2) Find the inverse of \(y=f(x)=\sqrt{2x+3}\) for \(x≥\frac{3}{2}\). Solve for \(x\) by \(y^2=2x+3⇒x=\frac{y^2-3}{2}\) or by
slv;y-(2*x+3)**(1/2);x ||. Interchange \(x\) and \(y\) to get the inverse \(f^{-1}(x)=\frac{x^2-3}{2}\). Check identities \(f[f^{-1}(x)]=\sqrt{x^2-3+3}=x\),
\(f^{-1}[f(x)]=\frac{2x+3-3}{2}=x\). Check plt;(2*x+3)**(1/2);(x**2-3)/2;x;itv=(-1.5,10) ||.
(3) If \(f(x)=\frac{1}{x}\) for \(x≠0\), then
\(f^{-1}(x)=\frac{1}{x}\). If \(f(x)=x,f^{-1}(x)=x\) for all \(x\). If \(f(x)=x^3,f^{-1}(x)=\sqrt[3]{x}\) for all \(x\). In general,
if \(f(x)=x^n,f^{-1}(x)=x^{\frac{1}{n}}\) for all \(x\) and \(n>0\) an odd integer. Check plt;x**3;x**(1/3);-(-x)**(1/3) || pc2;t**3;t || plt;1/x;x ||.
Graphs of inverses The graphs of \(f\) and \(f^{-1}\) are symmetric about the line \(y=x\), which implies if any point \((a,b)\) lies on \(f(x)\), the point \((b, a)\) lies on \(f^{-1}(x)\), and vice versa. So the midpoint \((\frac{a+b}{2},\frac{a+b}{2})\) of \((a,b)\) and \((b,a)\) is on the line \(y=x\), meaning the points on \(f\) and \(f^{-1}\) are equidistant from the line.
Examples The graphs of \(f\) and \(f^{-1}\) are reflections of one another about the line \(y=x\). Check the graphs plt;log(x);exp(x) || plt;x**2;x**(1/2);x;itv=(0,10) || plt;x**3;x**(1/3);x;itv=(0,10) || plt;(x+3)**(1/2);x**2-3;x;itv=(0,10) ||.
6 Polynomials
Classes of functions Combination, composition and transformation are common ways to form new and more complicated functions from old ones. Algebraic functions, a set of larger class of functions, involve addition, subtraction, multiplication, division, power and root (rational) of polynomials. Polynomials, rational, power and root functions are typical algebraic functions, where root functions are special case of power functions.
A function that is not algebraic is called transcendental, for example, xπ, ex, ln(x), sin(2x), tan-1(x) and so on. Trigonometric, exponential, and logarithmic functions are common transcendental functions. We will cover all these functions in this chapter but trigonometric functions.
Polynomials A general form of a polynomial is \(P_n(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0\), where \(n\) is a whole number, \(a_0, a_1, \cdots, a_n\) are coefficients, \(a_n≠0\) is the leading coefficient, and \(a_nx^n\) is the leading term. Constant, linear, quadratic, cubic, quartic, quintic functions and so on are all polynomials. Note that \(x^{-1},\frac{1}{x-1},x^{-2},\sqrt{x}\) are not polynomials.
Graphs of polynomials are continuous and smooth everywhere, which implies the domain and range of polynomials can be \((-∞,∞)\).
Graphs of \(x^n\) If \(n\) is an odd number, the basic graph of \(f(x)=x^n\) looks like the graph of \(y=x^3\). They are symmetric about the origin, increasing, and monotonic. As \(x\to \infty, f(x)\to\infty\) and as \(x\to -\infty,f(x)\to -\infty\).
If \(n\) is even, the basic graph of \(f(x)=x^n\) is U-shaped like a parabola \(y=x^2\). They are symmetric about the y-axis. As \(x\to \pm\infty, f(x)\to\infty\).
Examples Check the graphs plt;x;x**2;x**3 || plt;-x;-x**2;-x**3 || plt;x**2;x**4/2;x**6/5 || plt;x;x**3;x**5/4 || plt;-x**2;2-x**4/3;5-x**8/20 || plt;-x**3;3-x**5/6;5-x**7/15 || plt;-x**10/40;-x**16/100;x**20/200 || plt;x**9/20;x**13/50;x**21/400 ||.
Graphs of general polynomials The basic shape of \(P_n(x)\) depends on the coefficient \(a_n\) and degree \(n\) of the leading term \(a_nx^n\), and the roots as well as their multiplicity of the polynomial. The graph of \(P_n(x)\) is smooth on the entire real line and has no asymptote. At the positive and negative ends, the graph behaves like the graph of its leading term.
If \(n\) is even and \(a_n>0\), the basic graph of \(P_n(x)\) is U-shaped like \(x^4\), open upward; if \(a_n< 0\), open downward like \(-x^2\). If \(n\) is odd and \(a_n>0\), the end behavior of \(P_n(x)\) looks like the graph of \(x^3\). If \(a_n < 0\), the end behavior looks like \(-x^3\).
If the factor \(x-r\) has multiplicity \(m=1\) (linear factor), the graph of \(P_n(x)\) crosses the x-axis like a line at the point \(x=r\)
If \(m=2\) (quadratic factor) or a higher even number, the graph touches or tangent to the x-axis, bounces off at \(x=r\), and changes direction. The behavior near \(x=r\) is like that of a quadratic function.
If \(m=3\) (cubic factor) or a higher odd number, the graph crosses the x-axis at \(x=r\) and flattens out a bit, like the graph of \(x^3\) near \(x=0\).
Examples
(1) The polynomial \(0.3(x-2)(x+3)^2\) has two zeros. One is \(x=2\) with multiplicity \(m=1\), where graph cross x-axis. The other zero is \(x=-3\) with an even \(m=2\), where the graph touches the x-axis and turns like a quadratic function. Check its graph plt;0.3*(x-2)*(x+3)**2 ||.
(2) The polynomial \(0.05(x-2)^3(x+2)^2(x-4)\) has three zeros. One is \(x=2\) with an odd multiplicity \(m=3\), where the graph tangent to (flattened) and cross the x-axis. The second is \(x=-4\) with an even multiplicity \(m=2\), where the graph touches the x-axis and turns. The third one is \(x=3\) with \(m=1\), where the graph cross the x-axis. Check its graph plt;0.05*(x-2)**3*(x+2)**2*(x-4) ||.
(3) The polynomial \(-0.1x^5(x-3)^4\) has two distinct zeros. One is \(x=0\) with an odd multiplicity \(m=5\), where the graph tangent to and cross the x-axis. The other is \(x=3\) with an even multiplicity \(m=4\), where the graph touches the x-axis and turn. Check its graph plt;-0.1*x**5*(x-3)**4 ||.
(4) The graph of \(f(x)=0.02(x-2)^2(x^2-25)\) is basically U-shaped at two ends, because the leading term is \(0.02x^4\). The polynomial \(f\) has three distinct zeros. One is \(x=2\) with an even multiplicity \(m=2\), where the graph touches the x-axis and turns. The other two are \(x=±5\) where the graphs cross the x-axis. Check its graph plt;0.02*(x-2)**2*(x+5)*(x-5) ||.
Roots and multiplicities If \(x=r\) is a zero of \(P_n(x)\), then \(P_n(x)=(x-r)Q_{n-1}(x)\) for \(Q_{n-1}(x)\) a polynomial. If \(x=r\) is a repeated solution to \(P_n(x)=0\), then \(P_n(x)=(x-r)^2Q_{n-2}(x)\). The number of times a factor appears is called multiplicity. The factor form of \(P_n(x)\) with multiplicity \(m\) of \(x-r\) is \(P_n(x)=(x-r)^mQ(x)\) for \(Q(x)\) a polynomial of \(n-m\) degree and \(m≤n\), assuming \(P_n(x)\) has only one zeros. Similar rules apply to polynomials of multiple zeros.
A polynomial of degree \(n\) has at most \(n\) distinct zeros and at most \(n-1\) local extrema. Polynomials of odd degree have at least one real zero. We can use "slv" module to find the zeros of given polynomials.
Examples
(1) Find the zeros of the polynomial \(x^3-x^2-8x+12\) by slv;x**3-x**2-8*x+12;x ||. It has two zeros {-3, 2}. Check its
graph plt;x**3-x**2-8*x+12 ||.
(2) The zeros of \(2x^6-2x^5-4x^4=2x^4(x-2)(x+1)\) are {-1, 0, 2}. Check slv;2*x**6-2*x**5-4*x**4;x ||
plt;2*x**6-2*x**5-4*x**4 ||.
(3) The zeros of \(x^6-7x^3-8=(x^3-8)(x^3+1)\) are {-1, 2}. Check slv;x**6-7*x**3-8;x || plt;x**6-7*x**3-8 ||.
(4) The zeros of \(x^5-2x^3-8x=x(x^2-4)(x^2+2)\) are {-2, 0, 2} by slv;x**5-2*x**3-8*x;x || plt;x**5-2*x**3-8*x ||.
(5)
Find the zeros of \(y=x^4+x^3-5x^2-3x+6\). Since \(y=(x+2)(x^2-3)(x-1)\) by factoring, the four zeros are {\(-2,-\sqrt{3},1,\sqrt{3}\)}.
Check slv;x**4+x**3-5*x**2-3*x+6;x || plt;x**4+x**3-5*x**2-3*x+6 ||.
Slope of a linear function The slope of a non-vertical line through two distinct points \((x_1,y_1)\) and \((x_2,y_2)\) is \(m=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1}\) for \(x_2≠ x_1\), the ratio of vertical change over horizontal change. Any other two points on this line will result in the same slope. A slope can be any real number.
Slope measures the rate of change of \(y\) with respect to \(x\). If slope \(m=3\), then \(\Delta y=3\Delta x\), which means when \(x\) increases one unit, \(y\) increases 3 units. The slopes of horizontal lines \((y_1=y_2)\) are 0, meaning there is no change in \(y\) when \(x\) moves from left to right. The slopes of vertical lines \((x_2=x_1)\) are undefined.
Geometrically, the magnitude of a slope indicates the direction and steepness of a line. The greater the value \(|m|\), the steeper the line. A positive slope means the line goes up when \(x\) moves from left to right; a negative slope means the line slants downward.
The smallest counterclockwise angle of inclination 0 ≤ θ ≤ π from the positive x-axis to a line is also used to measure the direction of the line m = tan(θ) in terms of angles. A horizontal line has θ = 0° and a vertical line θ = 90°.
Examples
(1) The slope of a line through (0, 0) and (1, 2) is 2; the slope of a line through (-1, 3) and (2, -2) is -5/3; the slope
of a line through (7, -6) and (-3, -6) is 0; the slope of a line through (4, -5) and (4, 9) is undefined.
(2) The slope of a line intersecting
the x-axis at a angle of 30° is tan(30°) = \(\frac{\sqrt{3}}{3}\) by tan(30*pi/180) ||. The slope of a line intersecting the x-axis at an angle
of 45° is tan(45°) = 1 by tan(45*pi/180) ||. The slope of a line intersecting the x-axis at an angle of 120° is tan(120°) = -\(\sqrt{3}\)
by tan(120*pi/180) ||.
(3) Determine the smaller angle between the line through (2, 4) and (-1, -3) and the x-axis. The slope of the line is
7/3 = tan(θ). So the angle is atan(7/3) ≈ 66.8° by atan(7.0/3)*57.2958 ||.
(4) The x- and y-intercept of a line are -3, and 4,
respectively, so the slope of the line is 4/3 because the line is through (-3, 0) and (0, 4).
Linear functions and equations Linear functions are polynomials of degree 1. A general linear function is in the form \(ax+by+c=0\) for \(a\) and \(b\) not both 0. Setting \(x=0\), we get the y-intercept \(-\frac{c}{b}\), and setting \(y=0\) we get x-intercept \(-\frac{c}{a}\). Solving for \(y=-\frac{a}{b}x-\frac{c}{b}\), we get the slope \(m = -\frac{a}{b}\) and y-intercept \(y=\frac{c}{b}\).
A line through point \((x_1,y_1)\) with slope \(m\) has a point-slope form \(y=m(x-x_1)+y_1\).
A line with slope \(m\) and y-intercept \(b\) has a slope-y-Intercept form \(y=mx+b\).
A line with slope \(m\) and x-intercept \(a\) has a slope-x-intercept form \(y=m(x-a)\).
A line with an x-intercept \((a, 0)\) and y-intercept \((0, b)\) for \(a≠ 0\) and \(b≠ 0\) has a two-intercepts form \(\frac{x}{a}+\frac{y}{b}=1\).
A non-vertical line passing through points \((x_1,y_1)\) and \((x_2,y_2)\) has a point-point form \(\frac{y-y_1}{x-x_1}=\frac{y_2-y_1}{x_2-x_1}=m\).
In particular, the equation for a vertical line through points \((x_1, y_1)\) and \((x_1,y_2)\) is \(x=x_1\).
The equation for a horizontal line through \((x_1,y_1)\) and \((x_2,y_1)\) is \(y=y_1\).
Examples
(1) Given a linear equation \(2x+3y-6=0\), the x-intercept is \(x=3\), the y-intercept is \(y=2\), and the slope is \(-\frac{2}{3}\) obtained by solving \(y=-\frac{2}{3}x+2\). Check its graph plt;-2*x/3+2 ||.
(2) The equation of a line with slope 2 and through point (1, -3) is \(y=2(x-1)-3=2x-5\). Check its graph plt;2*x-5;pt=(1,-3) ||.
(3) A line through (3, -4) and (-6, 1) has an equation \(y=-\frac{5}{9}(x-3)-4\). Its slope is \(-\frac{5}{9}\). Check its graph plt;-5*(x-3)/9-4;pt=[(3,-4),(-6,1)] ||.
(4) The equation of a line through (-2, 3) and having a y-intercept 5 is \(y=(x+2)+3\). Its slope is 1. Check its graph plt;(x+2)+3;pt=[(-2,3),(0,5)] ||.
(5) The equation of a line through (2, -2) and having an x-intercept -2 is \(y=-\frac{1}{2}(x-2)-2\). Its slope is \(-\frac{1}{2}\). Check its graph plt;-(x-2)/2-2;pt=[(2,-2),(-2,0)] ||.
(6) The equation of a line having x- and y-intercept -3 and 4, respectively, is \(\frac{x}{-3}+\frac{y}{4}=1\). Note that the line through (-3, 0) and (0, 4). Check its graph plt;4*(1+x/3);pt=[(-3,0),(0,4)] ||.
Relations of lines and slopes Let \(L_1,L_2\) be two non-vertical lines with corresponding slopes \(m_1\) and \(m_2\), respectively.
(1) The two lines are parallel if and only if their slopes are equivalent, or \(L_1//L_2⇔ m_1=m_2\). If \(L_1\) has an equation \(ax + by +c =0\), then \(L_2\) has an equation \(ax + by+d=0\).
(2) The two lines are perpendicular if and only if \(m_1·m_2=-1\), or \(L_1\perp L_2⇔ m_1·m_2=-1\). If \(L_1\) has an equation \(ax + by +c =0\), then \(L_2\) has an equation \(bx-ay+d=0\).
(3) If they intersect, the point of intersection satisfies the equations of both lines.
Examples
(1) Let A(-6, -2), B(3, -1) and C(-2, 4) be the vertices of a triangle ABC. Refer to the graph pln;pg=[(-6,-2),(3,-1),(-2,4)] ||.
(i) Determine the slope of the median through A to side BC. The midpoint of BC is (0.5, 1.5), so the slope of the median joining (-6, -2) and (0.5, 1.5) is 3.5/6.5 = 7/13. (ii) Find the slope of the altitude from B and perpendicular to AC. The slope of side AC is 3/2, so the slope of the altitude is -2/3. (iii) Find the slope of the line segment joining the midpoints of AB and AC. Since this line segment is parallel to the third side BC, whose slope is -1, so its slope is 1. Check pln;pg=[(-6,-2),(3,-1),(-2,4)];ln=[(-4,1),(-1.5,-1.5)] ||.
(2) Find the equation of a line through (-4, 6) and parallel to the line \(2x-5y=7\). Since the slope of the line \(2x-5y=7\) is \(\frac{2}{5}\), the slope of the line is \(\frac{2}{5}\) and the equation is \(y=\frac{2}{5}(x+4)+6\). Check it graph plt;2*(x+4)/5+6;(2*x-7)/5;pt=(-4,6) ||.
(3) Find the equation of a line through (3, -5) and perpendicular to the line \(3x-4y=5\). Since the slope of the line \(3x-4y=5\) is \(\frac{3}{4}\), the slope of the line is \(-\frac{4}{3}\) and its equation is \(y=-\frac{4}{3}(x-3)-5\). Check its graph plt;-4*(x-3)/3-5;(3*x-5)/4;pt=(3,-5) ||.
Quadratic functions A quadratic function is just a quadratic polynomial \(f(x)=ax^2+bx+c\) for \(a≠ 0\). The simplest quadratic function is \(f(x)=x^2\), whose graph is a parabola, symmetric about the y-axis, and open upward. Other quadratic functions can be obtained by transforming \(f(x)=x^2\) in various ways. Their graphs are also parabolas, opens upward for \(a>0\) and down for \(a< 0\).
Zeros of quadratic functions A quadratic function has at most two zeros. They are given by the quadratic formula \(\frac{-b\pm \sqrt{b^2-4ac}}{2a}\), which may result in one, two or none zeros. The number of zeros depends on the discriminant \(D = b^2-4ac\). If \(D > 0\), then \(f(x)\) has two real zeros; if \(D< 0, f(x)\) has no real zero; if \(D=0, f(x)\) has one real zero \(x=-\frac{b}{2a}\).
Examples If \(f(x)=x^2+1,D=-4\), and \(f(x)\) has no zeros. If \(g(x)=x^2+x+2, D=-7\), and \(g(x)\) has no zero. Check slv;x**2+1;x || slv;x**2+x+2;x ||. Check more slv;2*x**2+x-1;x || slv;x**2-3;x || slv;3*x**2+4*x-2;x || slv;x**2-10*x+25;x ||.
Completing the square By completing the square, we can write a general quadratic function \(f(x)\) in terms of a square of a binomial plus a constant, or \(ax^2+bx+c=a(x+\frac{b}{2a})^2-\frac{D}{4a}\). By this new form, we can determine the maximum or minimum, the interval on which \(f(x)\) is increasing or decreasing, vertex, axis of symmetry, ways of transforming the graph of \(x^2\) to obtain the graph of \(f\), and other geometric features.
Specifically, if \(a>0,f(x)\) has the minimum \(-\frac{D}{4a}\), or the vertex is at \((-\frac{b}{2a},-\frac{D}{4a})\), and symmetry axis is \(x=-\frac{b}{2a}\). This implies \(f(x)\) is increasing if \(x< -\frac{b}{2a}\) and decreasing if \(x>-\frac{b}{2a}\).
If \(a< 0,f(x)\) has the maximum \(-\frac{D}{4a}\), or the vertex is at \((-\frac{b}{2a},-\frac{D}{4a})\), and symmetry axis is \(x=-\frac{b}{2a}\). So \(f(x)\) is increasing if \(x> -\frac{b}{2a}\) and decreasing if \(x<-\frac{b}{2a}\).
The graph of \(y=f(x)\) can be obtained by shifting the graph of \(y=x^2\) horizontally \(|\frac{b}{2a}|\) units, scaling the resulting graph vertically by a factor of \(|a|\), and shifting the resulting graph vertically by \(|\frac{D}{4a}|\) units.
Examples
(1) Find the vertex of \(y=x^2-2x+5\) and determine when \(y\) is increasing and decreasing. Completing the square, \(y=(x-2)^2+1\). So the vertex is at (2, 1), which implies \(y\) is increasing if \(x< 2\) and decreasing if \(x > 2\).
(2) If \(y=2x^2-6x-1\), describe the ways to obtain its graph by transforming the graph of \(x^2\). Completing the square, \(y=2(x^2-3x+\frac{9}{4})-\frac{11}{2}=2(x-\frac{3}{2})^2-\frac{11}{2}\). The graph of \(y\) can be obtained by horizontally compressing the graph of \(x^2\) a factor of 2, then shifting it to the right 1.5 units, and finally shifting it down 5.5 units. Check the graphs plt;x**2;2*x**2-6*x-1 ||.
(3) If \(y=(2-x)(3x+4)\), find the maximum value of \(y\) and the symmetry axis. Since \(y=-3x^2+2x+8\)\(=-3(x^2-\frac{2}{3}x+\frac{1}{9})+\frac{25}{3}=-3(x-\frac{1}{3})^2+\frac{25}{3}\). Since \(a=-3\), the parabola is open downward, and the maximum is \(y=\frac{25}{3}\). The symmetry axes is \(x=\frac{1}{3}\). Check the graph plt;(2-x)*(3*x+4);pt=(1/3,25/3) ||.
Other polynomials Use "plt" module to graph polynomials other than linear and quadratic functions, and use "slv" module to determine their roots.
Examples
(1) Find the roots of \(x^3-3x^2+4\) by slv;x**3-3*x**2+4;x ||, and graph it by plt;x**3-3*x**2+4 ||.
(2) Find the roots of \(0.1(x^5-6x^4+x^3+24x^2+16x)\) by slv;(x**5-6*x**4+x**3+24*x**2+16*x)/10;x ||, and graph it by plt;(x**5-6*x**4+x**3+24*x**2+16*x)/10 ||.
(3) Find all the roots of \(\frac{1}{64}(x^8+4x^6-64x^2-256)\) by slv;(x**8+4*x**6-64*x**2-256)/64;x;C || plt;(x**8+4*x**6-64*x**2-256)/64 ||. Observe that there are 8 roots (including complex roots) because the highest degree is 8.
7 Rational Functions and Power Functions
Rational functions Just as rational numbers are quotients of integers, rational functions are quotients of polynomials, \(f(x)=\frac{P(x)}{Q(x)}=\frac{a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0}{b_mx^m+b_{m-1}x^{m-1}+\cdots+b_1x+b_0}\) for \(a_n≠0, b_m≠0\).
The domain of \(f\) is the set of numbers \(x\) such that \(Q(x)≠0\). Polynomials can be viewed as special cases of rational functions for \(Q(x)≡1\), and both belong to a larger class of algebraic functions.
Examples All of these functions \(x,\frac{1}{x},x^{-3},\frac{x}{x^3+2}\) are rational functions. But these functions \(\sqrt{x},\frac{\sqrt{1-x^2}}{x^2-1},x^{π},x^{-\frac{1}{3}}\) are not rational functions.
Zeros of rational functions The zeros of the numerator \(P(x)\) are also the zeros of \(f(x)\) provided that \(P(x), Q(x)\) do not have common non-constant factors. Otherwise, it has a hole at each zero of both \(P(x)\) and \(Q(x)\) if the zero has greater or equal multiplicity in \(P(x)\) than in \(Q(x)\).
Examples There is no zero for \(\frac{2}{x+3}\), there is one zero for \(\frac{x-2}{x^2+5}\), and there are two zeros for \(\frac{x^2-3}{x^3+7}\). However, there is no zero but a hole for \(\frac{x-1}{x^2-1}\) at \(x=1\), and there is one zero \(x=3\) and one hole at \(x=-3\) for \(\frac{x^2-9}{x+3}\).
Horizontal, vertical and oblique asymptotes Suppose the polynomials \(P(x),Q(x)\) in a rational function \(f(x)\) have no common factors.
horizontal The function \(f(x)\) has no horizontal asymptote for \(n> m, f(x)\) has a horizontal asymptote \(y=0\) for \(n < m\), and a horizontal asymptote \(y=\frac{a_n}{b_m}\) for \(n=m\).
Vertical asymptote The line \(x=r\) is the vertical asymptote to the graph of \(f(x)\) provided \(Q(r)=0\). If a zero has greater multiplicity in \(Q(x)\) than in \(P(x)\), the graph of \(f(x)\) has vertical asymptotes at the zero of \(Q(x)\).
Oblique asymptote If \(n=m+1\), the line in form of \(y=ax+b\) is an oblique asymptote to the graph of \(f(x)\).
Examples
(1) The function \(f(x)=\frac{x^2-7}{x+2}\) has a vertical asymptote \(x=-2\), and an oblique asymptote \(y=x-2\) because
\(f(x)=x-2-\frac{3}{x+2}\). Check plt;(x**2-7)/(x+2);x-2 ||.
(2) The function \(\frac{x^3+1}{x^2+3}\) has neither vertical nor horizontal
asymptote. Check plt;(x**3+1)/(x**2+3) ||.
(3) The function \(\frac{x^2-2}{x^3+1}\) has a horizontal asymptote \(y=0\) and vertical asymptote
\(x=-1\) by plt;(x**2-2)/(x**3+1) ||.
(4) The function \(\frac{2x^2-4}{x^2+3}\) has a horizontal asymptote \(y=2\). Check plt;(2*x**2-4)/(x**2+3) ||.
(5) The function \(f(x)=\frac{2x^2-3x+1}{2x-4}=x+\frac{1}{2}+ \frac{3}{2x-4}\) has a vertical asymptote \(x=2\), and an oblique asymptote \(y=x+\frac{1}{2}\) to the graph of \(f(x)\). Check the graph plt;(2*x**2-3*x+1)/(2*x-4);x+1/2 ||.
Power functions For any real number \(r\), a function in form of \(f(x)=kx^r\) is called a power function for some constant \(k\). Do not confuse power functions with polynomials. Power functions have a single term with real exponents, whereas polynomials are a sum of multiple terms of power functions with nonnegative integer exponents.
Do not confuse power functions with exponential functions. Power functions \(kx^r\) have a variable base raised to a fixed number of power, whereas exponential functions \(a^x\) have a fixed base raised to a variable exponent. Note that \(-x^2,0.5x^{-1},3x^{\frac{2}{3}},2x^{-0.3},4x^{π},-5y^e\) are power functions, whereas \(2^x,3^{-x},0.6^y,(\frac{3}{4})^{-z},e^t\) are exponential functions.
Domain and range If \(r\) is a nonnegative integer, the power function \(kx^r\) becomes a polynomial. If \(r=\frac{p}{q}>0\) is rational, then \(y=x^r\) is a radical or root function.
If \(q≠0\) is even, the domain is \(x≥0\) and the range is \(y≥ 0\). When both \(q\) and \(p\) are odd, the domain is \(x∈ R\), and the range is \(y∈ R\). When \(q\) is odd and \(p\) is even, the domain is \(x∈ R\) and the range is \(y≥ 0\).
Examples
(1) The domains and ranges of \(4x^3,-5x^6,0.7x^9,-0.4x\) are all real numbers.
(2) The domains of
\(\sqrt{x^3},2x^{\frac{3}{4}},3x^{\frac{3}{8}},7x^{\frac{9}{6}}\) are all \(x≥0\) and the ranges of these functions are nonnegative.
(3) The
domains and ranges of \(x^{\frac{1}{3}},x^{\frac{3}{5}},x^{\frac{5}{7}}\) are all real numbers.
(4) The domain and range of \(x^{-\frac{3}{5}}\)
are all real numbers but 0; the domain and range of \(x^{-\frac{3}{4}}\) is all positive numbers; the domain of \(x^{-\frac{4}{5}}\) is all real numbers
but 0, and the range is all positive numbers.
Graphs of power functions To graph power function \(kx^r\), if \(r=\frac{p}{q}\) is rational and \(q\) is even, use "plt" module to plot their graphs. In case \(q\) is odd, use "imf" module to graph power functions, in particular root and radical functions.
Examples plt;2*x**(3/2) || plt;3*x**(3/4) || plt;4*x**(5/6) || plt;2*x**(-3/2) || plt;3*x**(-3/4) || plt;4*x**(-5/6) || plt;(1.2*x)**(5/6)+3 || plt;(3*x)**(-5/8)-2 || plt;x**(1/4);x**(1/2);x**(3/4) || plt;x**(1/3);x**(2/3);x**(5/6) || plt;x**(3/8);x**(5/8);x**(7/8) ||.
Examples
(1) \(y=\sqrt[3]{x}\), the "plt" module only yields the positive portion. Check plt;x**(1/3) ||. To use "imf" (implicit
functions), write the function as \(y^3=x⇒x-y^3=0\), and enter imf;x-y**3 ||. Keep in mind that when using "imf" module for graphs, the independent variable "x" always appears before dependent variable "y" in the equation. To obtain the graph of \(y=x^{\frac{2}{3}}\), rewrite it as \(y^3=x^2⇒x^2-y^3=0\) and enter imf;x**2-y**3 ||.
(2) Check more examples imf;x**2-y**5 || imf;2*x**3-3*y**5 || imf;x**3-2*y**7 || imf;2*x+y**3 || imf;3*x**2+y**3 || imf;3*x**4+2*y**5 ||.
Transforming power functions The graph of \(y=2(4x-5)^{\frac{2}{3}}-3\) can be obtained by transforming the graph of \(f(x)=x^{\frac{2}{3}}\). First horizontally compress the graph of \(f\) by a factor of 4, shift it to the right 5/4 units, then vertically stretch it by a factor of 2, and finally shift it down 3 units. Check imf;x**2-y**3 || imf;(4*x-5)**2-((y+3)/2)**3 ||.
8 Exponential Functions
Exponential functions A function in form of \(f(x) = b^x\) is an exponential function for all \(x\), where \(b >0,b≠1\) is its base. Exponential functions are often used to model how some quantities (e.g., populations, masses of radioactive substances, bank interests) change with time.
Examples of exponential functions are \(e^x, 2^x, 3^{-x}, 0.5^{-x}\). Different from power functions such \(x^3,x^{-4}\) and \(x^{\frac{3}{2}}\) with a variable base and constant exponent, exponential functions have a constant base and variable exponent. Note that there are different forms of exponential functions such as \(0.4^x=(\frac{2}{5})^x=\frac{2^x}{5^x}\).
Graphs of exponential functions Exponential functions \(b^x>0\) are either increasing or decreasing for \(x\), depending on its base. If \(b>1,b^x\) is increasing, and if \(0< b< 1,b^x\) is decreasing. All graphs of exponential functions pass through the point (0, 1).
Examples plt;2**x || plt;3**x || plt;1.2**x || plt;-2.5**x || plt;exp(x) || plt;(5/3)**(-x) || plt;1.5**(-x) || plt;-1.9**(-x) || plt;0.5**x || plt;0.6**x || plt;0.8**(-x) || plt;(3/5)**x || plt;-(2/3)**(-x) || plt;-0.3**(-x) || plt;1.5**x;2**x;exp(x) || plt;0.2**x;0.5**x;0.8**x || plt;0.7**x;1.5**x;3**x ||.
Transforming exponential functions
(i) Reflecting the graph of \(b^x\) across the y-axis, we obtain the graph of \(b^{-x}\); reflecting the graph of \(b^x\) across the x-axis, we get the graph of \(-b^x\), and reflecting the graph of \(b^x\) across both x-axis and y-axis, we get the graph of \(-b^{-x}\).
Examples Check plt;2**x;2**(-x) || plt;3**x;-3**x || plt;2.5**x;-2.5**(-x) || plt;exp(x);exp(-x);-exp(x) ||.
Notice that \(-b^x< 0\) and \(-b^{-x}< 0\) for all \(x\). If \(b>1\), both \(b^{-x}\) and \(-b^x\) are decreasing, and both \(b^x\) and \(-b^{-x}\) are increasing for all \(x\). For example, \(1.5^x\) and \(-1.5^{-x}\) are increasing, but \(1.5^{-x}\) and \(-1.5^x\) are decreasing for all \(x\).
Examples Check plt;1.5**x;-1.5**(-x) || plt;1.5**(-x);-1.5**x ||.
If \(0< b < 1\), then both \(b^{-x}\) and \(-b^x\) are increasing, and both \(b^x\) and \(-b^{-x}\) are decreasing for all \(x\). For example, \(0.5^x\) and \(-0.5^{-x}\) are decreasing, but \(0.5^{-x}\) and \(-0.5^x\) are increasing for all \(x\).
Examples Check plt;0.5**x;-0.5**(-x) || plt;0.5**(-x);-0.5**x ||. Check other examples plt;-10**(-x);10**(-x);-10**x || plt;-(6/7)**(-x);(6/7)**(-x);-(6/7)**x || plt;-(9/5)**(-x);(9/5)**(-x);-(9/5)**x ||.
(ii) The graph of \(y=2·(\frac{4}{3})^x-3\) can be obtained by first vertically stretching the graph of \((\frac{4}{3})^x\) by a factor of 2, and then shifting the resulting graph down 3 units.
Examples Check plt;(4/3)**x;2*(4/3)**x;2*(4/3)**x-3 ||.
(iii) The graph of \(y=-1.5e^{-x}+2\) can be obtained by first reflecting the graph of \(e^x\) across the y-axis, vertically stretching it by a factor of 1.5, then reflecting it across the x-axis, and finally shifting it up 2 units.
Examples Check plt;exp(-x);-1.5*exp(-x);-1.5*exp(-x)+2 ||.
Laws of exponents Let \(b> 0\). Then \(b^0=1, b^{-x}=\frac{1}{b^x}, b^{\frac{1}{n}}=\sqrt[n]{x}, b^xb^y=b^{x+y},
\frac{b^x}{b^y}=b^{x-y}\),
\((\frac{a}{b})^x=\frac{a^x}{b^x},(b^x)^y=b^{xy}, (ab)^x=a^xb^x,a^{\frac{x}{y}}=\sqrt[y]{a^x}=(\sqrt[y]{a})^x,a^x=e^{x\ln a}=b^{x\log_ba}\) (change of base).
Examples
(1) Enter a exponential function \(b^x\) by b**x || 2**x || -0.6**x || 0.4**(-x) || (2/3)**x || (7/6)**(-x) || 1.4**(-x) || plt;3**x;1.7**x;0.7**x ||.
(2) For natural exponential function \(e^x\), enter exp(x) in the module. For numerical example, exp(1.4) || exp(-2.3) ||. For functions, exp(-x) || -exp(x) || -exp(-2*x) || plt;-1.5*exp(x);exp(-1.2*x) || plt;exp(-x**2/2) ||.
Examples
(1) \(2^x·3^x=6^x;4^x·4^y=4^{x+y};3^x÷4^x=(\frac{3}{4})^x;(5^x)^2=5^{2x}=25^x\). Check 2**x*3**x || 4**x*4**y || 3**x/4**x || (5**x)**2 ||.
(2) \(0.5^x·4^x=2^x;7^x·7^{-x}=1;6^x÷6^{-x}=6^{2x}=36^x;\sqrt{9^x}=9^{\frac{x}{2}}=(\sqrt{9})^x=3^x\); \(16^{-\frac{x}{4}}= \frac{1}{16^{\frac{x}{4}}} =\frac{1}{2^x}=2^{-x}\). Check 0.5**x*4**x || 7**x*7**(-x) || 6**x/6**(-x) || 9**(x/2) || 16**(-x/4) ||.
(3) \(e^2>e; 2^3 > 2^{2.9}; 0.5^3 < 0.5^2; e^{-2} > e^{-3}; (\frac{5}{8})^4>(\frac{5}{8})^6;0.8^{-2}< 0.8^{-3}\). Check e**2>e || 2**3>2**2.9 || 0.5**2>0.5**3 || exp(-2)>exp(-3) || (5/8)**4>(5/8)**6 || 0.8**(-3)>0.8**(-2) ||.
Definition by differential equation Exponential functions with other base \(y = b^x\) can be transformed into a natural exponential function \(b^x = e^{x\ln(b)}\), and the natural exponential function \(y=e^x\) can be defined by its inverse \(y=\ln(x)⇒x=e^y\). Or it can be defined by the differential equation \(y'=y\) with initial value \(y(0)=1\).
9 Logarithmic Functions
Logarithmic functions are inverses of exponential functions. If \(b>0, b≠1\), the function \(y=\log_bx\) is called the logarithm to base \(b\) if and only if \(b^y=x\). By definition of inverse, \(\log_b(b^y)=y, b^{\log_b x}=x\).
The logarithm to base \(e\) is called natural logarithm \(y=\ln x\) if and only if \(x=e^y\), and the logarithm to base 10 is called common logarithm \(y=\log_{10}x\) if and only if \(10^y=x\). It follows that \(\ln e^y=y,e^{\ln x}=x\) and \(\log_{10}10^y=y,10^{\log_{10}x}=x\).
Attention When you evaluate ln(x), enter "log(x)" for natural logarithms. For logarithms with other bases, use the change of base formula. For example, enter "log(x)/log(5)" for log5(x) and "log(x)/log(10)" for log10(x).
Definition by integral The natural logarithmic function is also defined by \(\ln x=∫_1^x\frac{dt}{t}\).
Given exponential functions and logarithmic functions are mutual inverse, the domain of \(y=\log_bx\) is \(x>0\), and the range is the set of all real numbers. Since most values resulted from logarithmic functions are irrational numbers, sometimes it is not straightforward to compare results from logarithmic functions.
Examples Enter the natural logarithmic function \(\ln x=\log_ex\) by log(x) ||. Don't forget the parenthesis.
(1) For numerical values, enter log(2) || log(1.5) || log(e) || log(2/3) || log(0.8) || log(pi) || log(2**(1/2)) || log(5**(-2/3)) || log(9.0**(-3/4)) ||.
(2) For functions, enter log(x) || log(x/2) || log(4*x) || plt;log(x) || plt;3*log(x)-2 ||.
(3) For logarithms \(\log_bx\) to other bases, enter log(x)/log(b) || log(2)/log(2) || log(2)/log(e)==log(2) || log(3)/log(10) || log(0.5)/log(10) || log(2.3)/log(2) || log(3)/log(2/3) || log(2)/log(3/2) || log(4.5)/log(0.5) || log(1.7)/log(2.6) || log(2**(1/2))/log(3) || log(x)/log(2) || log(x)/log(3) || plt;log(x)/log(1.5) || plt;log(y)/log(2/3) || log(z)/log(5/3) ||.
(4) Check properties log(exp(3)) || exp(log(0.8)) ||.
Increasing and decreasing Just as exponential functions, logarithmic functions are monotonic, either increasing or decreasing, depending on their bases. The graphs of all logarithmic functions pass through point (1, 0) because \(\log_b 1=0\). If \(b>0, \log_bx\) is increasing, and if \(b< 0,\log_bx\) is decreasing.
Examples
(1) \(\log(0.5)< 0; \log(1)=0;\log(1.1)>0\); \(\log(e)=1;\log(3)>1;\log(9)>\log(6); \log(\frac{2}{3})< \log(\frac{3}{4})\). Check 0>log(.5) || log(1)==0 || log(1.1)>0 || log(e)==1 || log(3)>1 || log(9)>log(6) || log(3/4)>log(2/3) ||.
(2) \(\log_20.7< 0; \log_21=0;\log_21.3>0;\log_22=1;\log_22.2>1\); \(\log_2e>\log_22.3;\log_2\frac{1}{2}>\log_2\frac{1}{3};\log_2\frac{7}{3}>\log_2\frac{5}{3}\). Check 0>log(.7,2) || log(1,2)==0 || log(1.3,2)>0 || log(2,2)==1 || log(2.2,2)>1 || log(e,2)>log(2.3,2) || log(1/2;2)>log(1/3,2) || log(7/3,2)>log(5/3,2) ||.
(3) \(\log_{0.6}0.2>0;\log_{0.6}0.5>0;\log_{0.6}0.6=1;\log_{0.6}0.8< 1;\log_{0.6}1=0;\log_{0.6}1.3< 0\);
\(\log_{0.6}5>\log_{0.6}10;\log_{0.6}0.3>\log_{0.6}7\). Check log(.2,.6)>0 || log(.5,.6)>0 || log(.6,.6)==1.0 || log(.8,.6)< 1 || log(1,.6)==0.0 || log(1.3,.6)< 0|| log(5,.6)>log(10,.6) || log(.3,.6)>log(7,.6) ||.
(4) \(\log_89>\log_76\) because \(\log_89>1,\log_76< 1\); \(\log_{\frac{2}{3}}0.4>\log_70.9\) because \(\log_{\frac{2}{3}}0.4>0,\log_70.9< 0\). Check log(9,8)>log(6,7) || log(0.4,2/3)>log(0.9,7) ||.
(5) Let \(x=\log_87⇒7=8^x\), and let \(y=\log_97⇒7=9^y\). It follows \(7=8^x=9^y\). Clearly, it is impossible that \(x=y\) and \(x< y\), which implies \(x>y⇒\log_87>\log_97\). Check log(7,8)>log(7,9) ||. Check more examples log(9)/log(0.5)>log(9)/log(0.7) || log(5/6)/log(12)>log(5/6)/log(10) || log(7/9)/log(1/3)>log(7/9)/log(1/4) ||.
Examples Refer to the graphs of \(y=x-1\) and \(y=\ln x\) by plt;x-1;log(x) ||. Note that the line \(y=x-1\) is tangent to the graph of \(y=\ln x\) at the point (1, 0), and lies entirely above the graph of \(y=\ln x\) for \(x>0\), which implies \(\ln x≤x-1\) for all \(x>0\). Or \(\ln x≤x-1< x\) for all \(x > 0\) Check plt;x;x-1;log(x) ||. As result, \(2>\ln 2, 0.5>\ln 0.5, 3>\ln 3\), \(3>\ln4,7>\ln8,-0.3>\ln0.7,0.2>\ln1.2,-0.5>\ln0.5\). Check 2>log(2) || 0.5>log(0.5) || 3>log(3) || 3>log(4) || 7>log(8) || -0.3>log(0.7) || 0.2>log(1.2) || -0.5>log(0.5) ||.
Graph logarithmic functions plt;log(x) || graphs the natural logarithmic function \(y=\ln x\). Enter "plt;log(x)/log(b)", and plot the graphs of any logarithmic functions with base \(b>0\) by the change of base formula.
Examples So plt;log(x)/log(3) || shows the graph of \(y=\log_3x\). Check more examples plt;2**x;log(x)/log(2) || plt;log(x)/log(1.5);log(x)/log(2.5);log(x)/log(3.5) || plt;log(x)/log(0.4);log(y)/log(0.6);log(z)/log(0.8) || plt;log(x)/log(2);log(-x)/log(2);-log(-x)/log(2) || plt;log(x)/log(0.8);log(-x)/log(0.8);-log(x)/log(0.8) || plt;log(x)/log(5/9);log(-x)/log(5/9);-log(-x)/log(5/9) || plt;log(x)/log(10/3);log(-y)/log(10/3);-log(z)/log(10/3) || plt;2*log(-x);-log(x)/3;3*log(-x)+1 ||.
Transforming logarithmic functions The graph of ln(-\(x\)) can be obtained by reflecting the graph of ln(\(x\)) across the y-axis, the graph of -ln(\(x\)) can be obtained by reflecting the graph of ln(\(x\)) across the x-axis, and the graph of -ln(-\(x\)) can be obtained by reflecting the graph of \(\ln x\) across both x- and y-axis. Check plt;log(x);log(-x) || plt;log(x);-log(x) || plt;log(x);-log(-x) ||.
Examples
(1) The graph of \(y=2\ln(1.5x+3)-4\) can be obtained by first horizontally compressing the graph of \(\ln x\) by a factor of 1.5, shifting it to the left 2 units, then vertically stretching it by a factor of 2, and finally shifting it down 4 units. Check plt;log(x);2*log(1.5x+3);2*log(1.5x+3)-4 ||.
(2) The graph of \(y=-\frac{2}{3}\ln(1-0.5x)+3\) can be obtained by first horizontally stretching the graph of \(\ln x\) by a factor of 2, reflecting it across the y-axis, shifting it to the right 2 units, then vertically compressing it by a factor of 1.5, reflecting it across the x-axis, and finally shifting it up 3 units. Check plt;log(x);log(1-0.5*x);2*log(1-0.5*x)/3 || plt;log(x);-2*log(1-0.5*x)/3;-(2/3)*log(1-0.5*x)+3 ||.
(3) The graph of \(y=-\log_2(3x+5)+4\) can be obtained by horizontally compressing the graph of \(\log_2x\) by a factor of 3, shifting it to the left 5/3 units, then reflecting it across the x-axis, and finally shifting it up 4 units. Check plt;log(x,2);log(3*x+5,2);-log(3*x+5,2)+4 ||.
Laws of logarithm \(\log_b(xy)=\log_bx+\log_by, \log_b\frac{x}{y}=\log_bx-\log_by, \log_b(x^r)=r\log_ax\),
\(\log_bx=\frac{\ln x}{\ln b}=\frac{\log_ax}{\log_ab}\) (change of base). These laws can be easily verified by inverse operations.
Let \(u=\log_bx\), \(v=\log_by\). Then \(x=b^u,y=b^v⇒xy=b^{u+v}\)\(⇒\log_b(xy)=u+v\), and \(\frac{x}{y}=b^{u-v}⇒\log_b\frac{x}{y}=u-v\).
Let \(z=\log_bx^r⇒x^r=b^z⇒x=b^{\frac{z}{r}}⇒\frac{z}{r}=\log_bx⇒z=r\log_bx\).
For change of base formula, let \(w=\frac{\ln x}{\ln b}⇒\ln x=w\ln b=\ln b^w⇒x=b^w⇒w=\log_bx\). In a similar fashion, if \(w=\frac{\log_ax}{\log_ab}⇒\log_ax=w\log_ab=\log_ab^w⇒x=b^w⇒w=\log_bx\).
Examples
(1) \(\ln(6)=\ln2+\ln3;\ln\frac{3}{4}=\ln3-\ln4;\ln8=\ln2^3=3\ln2;\log_23=\frac{\ln3}{\ln2}\). Check log(6)==log(2)+log(3) || log(3/4)==log(3)-log(4) || log(8)-3*log(2) || log(3,2)==log(3)/log(2) ||.
(2) \(\ln\frac{1}{2}=\ln2^{-1}=-\ln2;\ln\frac{1}{9}=\ln1-\ln9\)\(=-2\ln3; \ln\sqrt[3]{25}=\frac{1}{3}\ln25=\frac{2}{3}\ln5\). Check log(1/2)+log(2) || log(1/9)+2*log(3) || log(25**(1/3))==2*log(5)/3 ||.
(3) \(7^x=e^{x\ln7};2^x=e^{x\ln2};3^{-x}=e^{-x\ln3};(\frac{9}{2})^x=e^{x(2\ln3-\ln2)}\). Verify some values 7**5-exp(5*log(7)) || 2**(-9)-exp(-9*log(2)) || 3**(-1.5)-exp(-1.5*log(3)) || (9/2)**0.85-exp(0.85*(2*log(3)-log(2))) ||.