We will first write cost function. As we are given three points here so we will use them to write quadratic function
----------------------------------------(1)
So we will plug point (2,30) in it first ( for 2 widgets cost is 30)
So simply plug 30 in y place and 2 in x place in equation (1) as shown
![30 = a(2)^(2) +b(2)+c](https://img.qammunity.org/2019/formulas/mathematics/middle-school/c8j0c49xwam1b5uyqm3q6ls8gmn4xr4ht5.png)
----------------------------------------------(2)
Similarly plug next point (4,118) now in equation (1)
![118 = a(4)^(2) +b(4)+c](https://img.qammunity.org/2019/formulas/mathematics/middle-school/116bl147s7g192bfbw9d9xofwz7s1i00t1.png)
----------------------------------------------(3)
Similarly plug third point (10,766) now in equation (1)
![766 = a(10)^(2) +b(10)+c](https://img.qammunity.org/2019/formulas/mathematics/middle-school/c9ocxifigtt8fb0h9h51moam5u0zwcd8zo.png)
----------------------------------------------(4)
Now we have to solve system of linear equations (2),(3) and (4) for a,b,c
We can use method of elimination
Subtract equation (3) - equation (2)
118 = 16a +4b +c
-(30 = 4a +2b +c)
----------------------------------------------------
88 = 12a +2b -----------------------------------(5)
Similarly subtract equation (4)-equation (3)
766 =100a +10b +c
-( 118 = 16a +4b +c)
--------------------------------------
648 = 84a + 6b ------------------------(6)
Now to eliminate b in equations (5) and (6) multiply equation (5) by -3 and then add to equation (6)
-3×(88 = 12a +2b)
-264 = -36a - 6b
648 = 84a + 6b
---------------------------------
384 = 48a
Now solve for a
![(384)/(48) = (48a)/(48)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/rgcmbfvsz0oi0azvy8cpvovfo8b9666psx.png)
8 = a
Plug 8 in a place in equation (5) or (6) and solve for b as shown
88 = 12(8) +2b
88 = 96 + 2b
88 -96 = 96 +2b -96
-8 = 2b
![(-8)/(2) = (2b)/(2)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/ke4sn5fiiwarnx0enmkwmdvzqs695ook6s.png)
-4 = b
now plug 8 in a place, -4 in b place in either of equations (2),(3) or (4) and solve for c
30 = 4(8) +2(-4) +c
30 = 32 -8 + c
30 = 24 + c
30 - 24 = 24 + c - 24
6 = c
So plugging values of a as 8, b as -4 and c as 6 in equation (1) we get
![y = 8x^(2) -4x+ 6](https://img.qammunity.org/2019/formulas/mathematics/middle-school/xm55ochodjh930j26tz3n9rjxgge47nxjl.png)
So thats the cost function. So now for 6 widgets, plug 6 in x place in this equation and find y value
![y = 8(6)^(2) -4(6)+ 6](https://img.qammunity.org/2019/formulas/mathematics/middle-school/b9z8xtdff2jwio6a8efkbuym4d7pyorbcd.png)
y = 8(36) - 24 +6
y = 288 -24 +6
y = 270
So $270 is the cost for producing 6 widgets and thats the final answer