Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
483 views

##Lab 12 Inverses and Logarithmic Functions Here we look at the general idea of an inverse of a function. An inverse of a function is a relation that takes you BACK to the original input value from a specific output value. For example, if we cube 3 we get 27, then take the cube root of 27, we get back to 3. But keep in mind that for a function between two sets of values, the domain and range, every element in the domain CAN ONLY MAP TO one element of the range. In general, all an inverse does is map RANGE elements back to the DOMAIN elements, ie., the range becomes the domain and vice versa. This becomes a problem when the original function is NOT 1-1, meaning 2 or more different domain elements can map to the same range element. Think of the squaring function, f(x)=x2f(x)=x^2. f(2)=4f(2)=4 and f(2)=4f(-2)=4. If we switched the ordered pairs, (2,4)(2,4) and (2,4)(-2,4) around, we would get (4,2)(4,2) and (4,2)(4,-2). This violates the function rule. So not only do we have to switch the domain and range, but we might have to RESTRICT the new domain!!! In the case of the squaring function with inverse square root function, the square root function only yields the positive value. We don't have to worry about restrictions if the original function is what we call ONE-TO-ONE. All linear functions are 1-1, some odd degree polynomial functions are 1-1 and ALL exponential functions are 1-1. Below I have a function defined by just 4 ordered pairs. I created the INVERSE by switching the x and y values and plotted both groups. In this case the inverse is actually a function.

function_points=[(1,2),(3,5),(0,3),(-1,-2)] inverse_points=[(2,1),(5,3),(3,0),(-2,-1)] p1=point(function_points, xmin=-6,xmax=6, ymin=-4,ymax=4, size=30) p2=point(inverse_points, size=30, color='red') p1+p2

Now let's suppose you need to find the inverse of the function, f(x)=x31f(x)=x^3-1. We just switch the x and y(after calling f(x) the y) on our own and tell SAGE to solve for y. . .

var('y') show(solve(x==y^3-1,y))
y
[y=12(x+1)13(i31)\displaystyle y = \frac{1}{2} \, {\left(x + 1\right)}^{\frac{1}{3}} {\left(i \, \sqrt{3} - 1\right)}, y=12(x+1)13(i31)\displaystyle y = \frac{1}{2} \, {\left(x + 1\right)}^{\frac{1}{3}} {\left(-i \, \sqrt{3} - 1\right)}, y=(x+1)13\displaystyle y = {\left(x + 1\right)}^{\frac{1}{3}}]

SAGE goes overboard!!! We only want the last solution.

︠d91137cd-e81b-4ab6-a00b-42d52217060d︠ ︠c618ffb5-84ce-400c-a677-9cbc0f18bf45︠ ︠f903b474-24ab-44e3-a62c-4621b5b069f2︠ ︠19495102-2b6a-454a-b501-452add88a9ed︠ ︠87f8d41c-f625-4f63-8208-ec04544992f9︠ ︠2d3125a9-8815-441b-8c4f-19c8b608b289︠ ︠bcfec7ef-5b83-48eb-b594-4ab11205ccaa︠ ︠ac53747f-616e-4b0d-892e-4c9c061df98e︠ ︠e3167b20-f7a3-4419-be16-3dac4a89af32︠ ︠abd68af5-3a17-4c6d-a583-fd199a8f6b7b︠ ︠f956c669-1f0b-43db-9d5d-433a32ec3c1a︠