Cost Function Example for Shirts

Cost Function Example for Shirts
Loading the math board and drawing, please wait…
2015-10-13 23:17
This example demonstrates how to use GeoGebra to plot a linear function representing the total cost of buying shirts, including the fixed shipping fee and per-shirt cost. Key math concepts involve linear functions, cost calculation, slope, and y-intercept. Construction highlights include commands like Polygon, LaTeX, Mod, If, Vector, OrthogonalLine, Intersect, Segment, VerticalText, and TableText. Suitable for high school students learning the application of linear functions in real-life scenarios and graphing techniques.

GeoGebra Commands & Parameters

  1. Polygon(A, B, C, D) → Toppoly1, a, b, c, d
  2. Polygon(E, F, G, H) → Rightpoly1, e, f, g, h
  3. Polygon(I, J, K, L) → Topnewpoly, i, j, k, l
  4. LaTeX("\text{Create a table to show how the two quantities described vary.}") → Pg1A
  5. LaTeX("\text{The two quantities described are the number of shirts and the total cost of the shirts}") → Pg1B
  6. LaTeX("\text{ (including shipping).}") → Pg1B1
  7. LaTeX("\text{Choose several values for the number of shirts and calculate the associated cost.}") → Pg1D
  8. LaTeX("\text{Graph the relationship.}") → Pg2A
  9. LaTeX("\text{Use the table of values to graph the relationship.}") → Pg2B
  10. LaTeX("\text{Determine the slope and what it means in the context of the problem.}") → Pg3A
  11. LaTeX("\text{slope\textcolor{#000099}{ =\frac{y₂-y₁}{x₂-x₁}}}") → Pg3E
  12. LaTeX("\text{Slope formula}") → Pg3E2
  13. LaTeX((((("\text{slope\textcolor{#000099}{ =\frac{(" * G2) * ")-(") * G1) * ")}{(2)-(1)}}}")) → Pg3F
  14. LaTeX((("\text{slope\textcolor{#000099}{ =\frac{" * SUG) * "}{1}}}")) → Pg3G
  15. LaTeX("\text{Subtract.}") → Pg3G2
  16. LaTeX((("\text{slope\textcolor{#000099}{ =" * SUG) * "}}")) → Pg3H
  17. LaTeX("\text{Simplify.}") → Pg3H2
  18. LaTeX("\text{graphed values.}") → Pg4C
  19. LaTeX("\text{\textcolor{#000099}{x}-coordinate.}") → Pg4E
  20. Mod(F1, CF1) → Cond
  21. If(Cond ≠ 0, LaTeX["\text{number of shirts needs to be a whole number.}"]) → Pg4J
  22. Vector(G0, Gtry) → Vector
  23. LaTeX((("\text{Use the slope to determine how many shirts can be purchased for \textcolor{#000099}{\textdollar" * S3) * "}.}")) → Pg4A
  24. LaTeX((("\text{The number of shirts that can be purchased for \textcolor{#000099}{\textdollar" * S3) * "} can be estimated from the}")) → Pg4B
  25. OrthogonalLine(GF, xAxis) → m
  26. OrthogonalLine(GF, yAxis) → n
  27. LaTeX((((("\text{then adding \textcolor{#000099}{" * S2) * "} to include the \textcolor{#000099}{\textdollar") * S2) * "} shipping fee.}")) → Pg1C1
  28. LaTeX((("\text{The total cost can be determined by multiplying the number of shirts by \textcolor{#000099}{" * S1) * "} and}")) → Pg1C
  29. OrthogonalLine(DUMMY, m) → p
  30. OrthogonalLine(DUMMY, p) → q
  31. Intersect(n, q) → M
  32. Intersect(m, p) → N
  33. Segment(M, GF) → r
  34. Segment(GF, N) → s
  35. LaTeX((("\text{Cost of a shirt=\textdollar" * S1) * "}")) → DKT1
  36. LaTeX((("\text{Standard shipping fee=\textdollar" * S2) * "}")) → DKT2
  37. VerticalText("\text{Cost \textcolor{#000099}{(\textdollar)}") → VertYaxis
  38. LaTeX("\text{Let \textcolor{#000099}x represent the number of shirts and \textcolor{#000099}y represent the cost in dollars.}") → Pg2C
  39. LaTeX((("\text{problem that each shirt costs \textcolor{#000099}{\textdollar" * SUG) * "}.}")) → Pg3J
  40. TableText({{LaTeX["\text{\mathbf{Number\;of\;shirts}}"], LaTeX[(("\text{\textcolor{#000099}{" * H1) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * H2) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * H3) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * H4) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * H5) * "}}")]}, {LaTeX["\text {\mathbf{Calculation}}"], LaTeX[(((((((("\text{\textcolor{#000099}{" * S1) * "(") * H1) * ") + ") * S2) * " = ") * G1) * " }}")], LaTeX[(((((((("\text{\textcolor{#000099}{" * S1) * "(") * H2) * ") + ") * S2) * " = ") * G2) * " }}")], LaTeX[(((((((("\text{\textcolor{#000099}{" * S1) * "(") * H3) * ") + ") * S2) * " = ") * G3) * " }}")], LaTeX[(((((((("\text{\textcolor{#000099}{" * S1) * "(") * H4) * ") + ") * S2) * " = ") * G4) * " }}")], LaTeX[(((((((("\text{\textcolor{#000099}{" * S1) * "(") * H5) * ") + ") * S2) * " = ") * G5) * "}}")]}, {LaTeX["\text{\mathbf{Cost\;(\textcolor{#000099}{\textdollar})}}"], LaTeX[(("\text{\textcolor{#000099}{" * G1) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * G2) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * G3) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * G4) * "}}")], LaTeX[(("\text{\textcolor{#000099}{" * G5) * "}}")]}}, "vc|_") → Table
  41. LaTeX((("\text{How many shirts can be purchased for \textcolor{#000099}{\textdollar " * S3) * "}? Assume there is no sales tax.}")) → Question2
  42. LaTeX((((("\text{Cost of a shirt:\textcolor{#000099}{\textdollar" * S1) * "}; Standard shipping fee: \textcolor{#000099}{\textdollar") * S2) * "}}")) → Question1
  43. LaTeX((("\text{Determine the slope by using the slope formula, slope\textcolor{#000099}{=}\textcolor{#000099}{ \frac{y₂-y₁}{x₂-x₁}}. Let (\textcolor{#000099}{x₁,y₁}) be (\textcolor{#000099}{1},\textcolor{#000099}{" * G1) * "})}")) → Pg3B
  44. LaTeX((("\text{and (\textcolor{#000099}{x₂,y₂}) be (\textcolor{#000099}{2," * G2) * "}). Substitute these values into the slope formula to find the slope}")) → Pg3C
  45. LaTeX("\text{of the line, and then simplify.}") → Pg3D
  46. LaTeX((((("\text{Substitute \textcolor{#000099}{" * G1) * "} for \textcolor{#000099}{y₁}, \textcolor{#000099}{") * G2) * "} for \textcolor{#000099}{y₂}, \textcolor{#000099}{1} for \textcolor{#000099}{x₁}, and \textcolor{#000099}{2} for \textcolor{#000099}{x₂}.}")) → Pg3F2
  47. LaTeX((((("\text{The slope is \textcolor{#000099}{" * SUG) * "}, or \textcolor{#000099}{\textdollar") * SUG) * "} per shirt. This verifies the given information in the}")) → Pg3I
  48. LaTeX((("\text{Find \textcolor{#000099}{" * S3) * "} on the \textcolor{#000099}{y}-axis, and then look to the right to determine the corresponding }")) → Pg4D
  49. LaTeX((((("\text{From the graph, it appears that for \textcolor{#000099}{\textdollar" * S3) * "}, about \textcolor{#000099}{") * CF1) * "} shirts can be purchased.}")) → Pg4F
  50. LaTeX((("\text{Using the rate of \textcolor{#000099}{\textdollar" * S1) * "} per shirt, the number of shirts can also be found by first subtracting}")) → Pg4G
  51. LaTeX((((((((("\text{\textcolor{#000099}{" * S2) * "} from \textcolor{#000099}{") * S3) * "} and then dividing the result by \textcolor{#000099}{") * S1) * "}. This yields a result of \textcolor{#000099}{") * F1) * "};}")) → Pg4H
  52. If(Cond ≠ 0, LaTeX[(((("\text{however, in the context of this problem, \textcolor{#000099}{" * F1) * "} must be rounded down to \textcolor{#000099}{") * CF1) * "}, since the}")]) → Pg4I
  53. LaTeX("\text{\mathbf{slope} the measure of the rate of change of one variable with respect to another}") → WTK1
  54. LaTeX("\text{variable; slope\textcolor{#000099}{ =\frac{y₂-y₁}{x₂-x₁}}\textcolor{#000099}{ =\frac{\triangle y}{\triangle x}}\textcolor{#000099}{=\frac{rise}{run}}; the slope in the equation \textcolor{#000099}{y = mx + b} is \textcolor{#000099}{m}.}") → WTK2
  55. LaTeX((("\text{Total paid=\textdollar" * S3) * "}")) → DKT3

AI Drawing Prompt Reference

Create a graph of a linear function representing the total cost of buying shirts, including a fixed shipping fee and a per-shirt cost. Include a table showing the relationship between the number of shirts and the total cost. Calculate and label the slope of the linear function, explaining its meaning in the context. Determine how many shirts can be purchased for a given budget and show the calculations.
The prompt above was compiled from the original drawing commands and is for reference only.