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

##Lab 8 Quadratic Functions In this lab you will review the solution processes for finding zeroes of quadratic functions. You will also examine different forms of a quadratic function. First, there are 3 solution processes you can use when solving a quadratic by hand: factoring, complete the square and the quadratic formula. Let's only look at the quadratic formula since it will work fastest.(Of course we can just tell SAGE to SOLVE it!)

#study my lines of code, then execute a,b,c,x=var('a,b,c,x') #I am going to create a quadratic function given its three coefficients: a, b and c general_quad(a,b,c,x)=a*x^2+b*x+c general_quad(1,2,3,x); show(general_quad(1,2,3,x))#an example general_quad(1,2,3,x).plot() #I am going to create a "list" of the solutions as calculated by the quadratic formula. solutions(a,b,c)=[(-b+sqrt(b^2-4*a*c))/(2*a),(-b-sqrt(b^2-4*a*c))/(2*a)] solutions(1,2,3); show(solutions(1,2,3)); #You'll notice that SAGE doesn't turn the complex solutions into the imaginary form ︠51147d3f-72ec-4d3a-b064-4e35de155eb7i︠ %md Your turn. . . Use copy and paste with the code above to create, graph and find the solutions to these three: 1. $3x^2-12x+10$ 2. $-\frac{x^2}{2}-4x-12$ 3. $x^2-19$

Your turn. . . Use copy and paste with the code above to create, graph and find the solutions to these three:

  1. 3x212x+103x^2-12x+10

  2. x224x12-\frac{x^2}{2}-4x-12

  3. x219x^2-19

The above code created quadratics in the general form. Let's take a moment and examine the factored form. Here we'll create a quadratic in its factored form. You will see that the zeroes of this type will just be constants inside the binomial factors.

#examine code before executing m,n=var('m,n') factored_quad(a,m,n,x)=a*(x-m)*(x-n); show(factored_quad(a,m,n,x)) factored_quad(1,3,-2); show(factored_quad(1,3,-2)) #solving the factored quadratic after setting equal to zero solutions_factored(a,m,n)=solve(factored_quad(a,m,n,x)==0,x) solutions_factored(1,3,-2); show(solutions_factored(1,3,-2))#Of course we already know that the zeros are m and n! #m and n, being zeros, will also be the x-intercepts of the parabola(if they're real) plot(factored_quad(1,3,-2,x),(x,-3,4)) ︠42da61d6-178f-44ae-ab77-6857f828f4bai︠ %md Create factored form quadratics and graph them for the following criteria: 1. leading term coefficient is 1/2. Zeros are 5 and $\sqrt{2}$ 2. leading term coefficient is .03. x-intercepts are $3\sqrt{3}$ and $-2\sqrt{3}$ 3. leading term coefficient is -3. Zeros are both -4.

Create factored form quadratics and graph them for the following criteria:

  1. leading term coefficient is 1/2. Zeros are 5 and 2\sqrt{2}

  2. leading term coefficient is .03. x-intercepts are 333\sqrt{3} and 23-2\sqrt{3}

  3. leading term coefficient is -3. Zeros are both -4.

The vertex form of a quadratic depends on the coordinates of the vertex of the resulting parabola and also the vertical line of the form x=hx=h called the axis of symmetry.

h,k=var('h,k') vertex_quad(a,h,k,x)=a*(x-h)^2+k; show(vertex_quad(a,h,k,x)) #Here's a parabola that opens up with a vertex = (2,3) vertex_quad(.5,2,3,x); show(vertex_quad(-5,2,3,x)) #Now to plot it along with the axis of symmetry. You will notice a new plot command called 'line' p1=plot(vertex_quad(.5,2,3,x),xmin=-10,xmax=10)#the parabola p2=line([(2,-20),(2,70)],linestyle="--",color='red')#the axis of symmetry vertex=point((2,3),size=30,color='black')#the vertex p1+p2+vertex#plot the parabola, the axis of symmetry and the vertex ︠e0439808-a4ab-4cb3-87a0-f7664d160c54︠ %md Use the above code to produce parabolas with these characteristics. Graph the parabolas, alongwith the axis of symmetry and vertex point. 1. Has a vertex at (-4,5) and opens downward. 2. Has a vertex at (5,-6) and opens upward. 44a60afd-6ca4-40b0-bbb2-d0f013fa88c1︠ ︠7507b026-cbdc-40c5-a6a3-478c333d96bb︠ ︠41f9ef23-54ae-4017-ba65-9f2a80a33651is︠ %md One of the questions you will probably be asked is to create a quadratic in vertex form that has a particular vertex, (h,k), and also has a particular y-intercept. Below I direct SAGE to create and graph a parabola that has its vertex at (5,8) and its y-intercept at (0,1). I'll use a couple of code blocks since I need to calculate as I work. the first thing I have to do is determine the "a"-value since I know (h,k). I know that when x=0, y=1 so I will use this info to find a.

One of the questions you will probably be asked is to create a quadratic in vertex form that has a particular vertex, (h,k), and also has a particular y-intercept. Below I direct SAGE to create and graph a parabola that has its vertex at (5,8) and its y-intercept at (0,1). I'll use a couple of code blocks since I need to calculate as I work. the first thing I have to do is determine the "a"-value since I know (h,k). I know that when x=0, y=1 so I will use this info to find a.

a=var('a') #I will replace x, h, k with 0, 5 and 8 and set equal to 1(the y-intercept) a*(0-5)^2+8==1; show(a*(0-5)^2+8==1) #Now I will solve this equation for 'a' solve(a*(0-5)^2+8==1,a); show(solve(a*(0-5)^2+8==1,a))
25*a + 8 == 1
25a+8=1\displaystyle 25 \, a + 8 = 1
[a == (-7/25)]
[a=(725)\displaystyle a = \left(-\frac{7}{25}\right)]
#Now to use this a-value to create the plot. Being efficient(lazy), I'll copy and paste from previous work p1=plot(-7/25*(x-5)^2+8,xmin=-10,xmax=10)#the parabola in the form, a*(x-h)^2+k p2=line([(5,-20),(5,70)],linestyle="--",color='red')#the axis of symmetry vertex=point((5,8),size=30,color='black')#the vertex p1+p2+vertex#plot the parabola, the axis of symmetry and the vertex

Create and graph the parabola with vertex, (-1,-2), and y-intercept=6.

︠0ddcebcf-f57f-4cec-88e1-2ff1b63c0f7e︠ ︠653ed418-3f23-486c-946e-3fb9bd78ed4a︠