How can I use a graph to write an algebraic function?

1 Answer
Feb 5, 2016

From the graph you should be able to determine some (x,y)(x,y) coordinates. Use these point to solve the general equation form for the constants.

Explanation:

The number of point you need will depend upon the shape of the graph: 2 sets for a linear graph; 3 sets for a parabola and so on.

Examples:

1. Linear Graph
graph{(y-(5x-3))(x^2+(y+3)^2-0.01)((x-1)^2+(y-2)^2-0.01)=0 [-5.15, 7.337, -4.03, 2.213]}
2 possible points that could be read from this graph:
color(white)("XXX")(x,y) in { (0,-3), (1,2)}XXX(x,y){(0,3),(1,2)}

General form of a linear equation (one version):
color(white)("XXX")y=ax+bXXXy=ax+b

Using the points we read from the graph for (x,y)(x,y)
color(white)("XXX")-3=axx(0)+bXXX3=a×(0)+b
color(white)("XXX")2=axx(1)+bXXX2=a×(1)+b
Two equations in two variables can be easily solved as :
color(white)("XXX")b=-3 and a=5XXXb=3anda=5
So the equation can be written as
color(white)("XXX")y=5x-3XXXy=5x3

2. Parabolic Graph
graph{(y-(3*x^2 -2x +4))((x-1)^2+(y-5)^2-0.01)((x+1)^2+(y-9)^2-0.01)(x^2+(y-4)^2-0.01)=0 [-4.23, 6.87, 3.568, 9.115]}
3 possible points that could be read from this graph:
color(white)("XXX")(x,y) in {(-1,9), (0,4), (1,5)}XXX(x,y){(1,9),(0,4),(1,5)}

Using the general form for a parabola of:
color(white)("XXX")y=ax^2+bx+cXXXy=ax2+bx+c

and the points we read from the graph:
color(white)("XXX")9=a(-1)^2+b(-1)+cXXX9=a(1)2+b(1)+c
color(white)("XXX")4=a(0)^2+b(0)+cXXX4=a(0)2+b(0)+c
color(white)("XXX")5=a(1)^2+b(1)+cXXX5=a(1)2+b(1)+c
Again (without the details) we have 3 equations in 3 variables that can be solved as
color(white)("XXX")a=3, b=(-2), c=4XXXa=3,b=(2),c=4
So the equation can be written as
color(white)("XXX")y=3x^2-2x+4XXXy=3x22x+4

More complex polynomials will require more points but the process is identical.