Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
483 views
%md ##Lab #5 Linear Functions and Equations Now it's time for you to start using SAGE to really learn math!! We begin with linear or first degree functions since the x-variable is raised only to the first power. Please first follow these steps: 1. Define the *variables* $x,m,b,x_0,x_1,y_0,y_1$ 2. Define the linear function, **slope_int(x)** as $mx+b$. Note that the variable of the function is x. 3. Define a second type of linear function, **point_slope(x)** as $m(x-x_0)+y_0$ Note that the variable of the function is again x. 4. Create a formula(function of $(x_0,y_0)$ and $(x_1,y_1)$) that calculates the slope, $m$, when given two points, $(x_0,y_0)$ and $(x_1,y_1)$ You have completed the basic setup at this point. Now it's time to put SAGE to work!! 5. Work with the slope-intercept form of a linear equation * Create and plot using the slope-intercept form the line that has slope$=\frac{3}{50}$ and y-intercept$=2$. Make sure you adjust the axis settings so that you can see both the x- and y- intercept locations. * Determine $slope-int(0)$ to verify that the y-intercept is actually zero. * Find the x-intercept by setting your $slope-int(x)$ function equal to zero and solving it. * Add the two points that are the x- and y-intercepts to your line graph. * Calculate the value produced by the function for $x=250$. Add this point to the graph. * Determine the x-value that produces the value 2700 and add it to the graph, making axis scale adjustments as necessary. 6. Work with the point-slope form of a linear equation * Create and graph the *point-slope* linear function that passes through the point $(2,3)$ and has slope$=\frac{5}{6}$. * Determine the y-intercept of the function by substituting 0 for x. This is called the **initial value** of the function. * Determine the x-intercept of the function by setting the function equal to zero and solving the equation. This is called **finding the root**. * Plot the point, (3,10), then find the vertical distance from this point to the line. To do this, you will have to determine the value of the function at x=3. * Create a new function with the name of your choice that models this situation: When the clock starts the position is 300 and every 15 seconds the position decreases 14 units. Graph this function and determine the position after 2 seconds. Also determine the time at which the position is zero. 7. Use SAGE to determine a linear function(name is your choice) that passes through the points (3,5) and (-7,-15). Plot this function, determine its slope and x- and y- intercepts.

##Lab #5 Linear Functions and Equations

Now it's time for you to start using SAGE to really learn math!! We begin with linear or first degree functions since the x-variable is raised only to the first power. Please first follow these steps:

  1. Define the variables x,m,b,x0,x1,y0,y1x,m,b,x_0,x_1,y_0,y_1

  2. Define the linear function, slope_int(x) as mx+bmx+b. Note that the variable of the function is x.

  3. Define a second type of linear function, point_slope(x) as m(xx0)+y0m(x-x_0)+y_0 Note that the variable of the function is again x.

  4. Create a formula(function of (x0,y0)(x_0,y_0) and (x1,y1)(x_1,y_1)) that calculates the slope, mm, when given two points, (x0,y0)(x_0,y_0) and (x1,y1)(x_1,y_1)

You have completed the basic setup at this point. Now it's time to put SAGE to work!!

  1. Work with the slope-intercept form of a linear equation

    • Create and plot using the slope-intercept form the line that has slope=350=\frac{3}{50} and y-intercept=2=2. Make sure you adjust the axis settings so that you can see both the x- and y- intercept locations.

    • Determine slopeint(0)slope-int(0) to verify that the y-intercept is actually zero.

    • Find the x-intercept by setting your slopeint(x)slope-int(x) function equal to zero and solving it.

    • Add the two points that are the x- and y-intercepts to your line graph.

    • Calculate the value produced by the function for x=250x=250. Add this point to the graph.

    • Determine the x-value that produces the value 2700 and add it to the graph, making axis scale adjustments as necessary.

  2. Work with the point-slope form of a linear equation

    • Create and graph the point-slope linear function that passes through the point (2,3)(2,3) and has slope=56=\frac{5}{6}.

    • Determine the y-intercept of the function by substituting 0 for x. This is called the initial value of the function.

    • Determine the x-intercept of the function by setting the function equal to zero and solving the equation. This is called finding the root.

    • Plot the point, (3,10), then find the vertical distance from this point to the line. To do this, you will have to determine the value of the function at x=3.

    • Create a new function with the name of your choice that models this situation: When the clock starts the position is 300 and every 15 seconds the position decreases 14 units. Graph this function and determine the position after 2 seconds. Also determine the time at which the position is zero.

  3. Use SAGE to determine a linear function(name is your choice) that passes through the points (3,5) and (-7,-15). Plot this function, determine its slope and x- and y- intercepts.

%md Now we'll look at solving linear equations of first degree like $2x-3=7-20x$. If we consider that each side of a linear equation is a *function*, you can think of the solution, x, as the x-coordinate of the function lines' intersection point. We'll look at two examples. The first is simply solving a linear equation. The second concerns finding the coordinates of intersection for two linear functions. c06549cb-496d-44f0-a056-3c901af48032︠ #solve 3x-2=10x+25 solve(3*x-2==10*x+25,x)#don't forget the double-equals sign to indicate an equation!! show(solve(3*x-2==10*x+25,x)) #piece of cake, right? ︠efface81-3c05-496a-bb19-efd2a962224as︠ #Now let's find the intersection point for the functions, f(x)=3x+50 and g(x)=-2x+75. We'll also determing the x-values for which f(x) is less than or equal to g(x) f(x)=3*x+50; g(x)=-2*x+75 #defined the functions solve(f(x)==g(x),x) #set them equal and now solving the equation show(solve(f(x)==g(x),x)) #Now am going to find the y-coordinate. . . f(5)# Of course I can't do this until I execute the solve command! #You create the plot command to plot the two functions and the point of intersection! solve(f(x)<=g(x),x) #set them equal and now solving the equation show(solve(f(x)<=g(x),x)) ︠03a020c5-fd72-408c-ab62-eeadb1184d0eis︠ %md SAGE is designed to do all the dirty work with you as a guide. Your assignment for the remainder of this lab is to create the command blocks to handle examples 1, 3, and 5 from section 1.6 on applications of linear functions. Duplicate what the authors have done using SAGE.

SAGE is designed to do all the dirty work with you as a guide. Your assignment for the remainder of this lab is to create the command blocks to handle examples 1, 3, and 5 from section 1.6 on applications of linear functions. Duplicate what the authors have done using SAGE.

︠5bed5c4c-6ac3-4bda-811a-d40491bbfcac︠