Cost Function Example for Shirts
Loading the math board and drawing, please wait…
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
Polygon(A, B, C, D) → Toppoly1, a, b, c, dPolygon(E, F, G, H) → Rightpoly1, e, f, g, hPolygon(I, J, K, L) → Topnewpoly, i, j, k, lLaTeX("\text{Create a table to show how the two quantities described vary.}") → Pg1ALaTeX("\text{The two quantities described are the number of shirts and the total cost of the shirts}") → Pg1BLaTeX("\text{ (including shipping).}") → Pg1B1LaTeX("\text{Choose several values for the number of shirts and calculate the associated cost.}") → Pg1DLaTeX("\text{Graph the relationship.}") → Pg2ALaTeX("\text{Use the table of values to graph the relationship.}") → Pg2BLaTeX("\text{Determine the slope and what it means in the context of the problem.}") → Pg3ALaTeX("\text{slope\textcolor{#000099}{ =\frac{y₂-y₁}{x₂-x₁}}}") → Pg3ELaTeX("\text{Slope formula}") → Pg3E2LaTeX((((("\text{slope\textcolor{#000099}{ =\frac{(" * G2) * ")-(") * G1) * ")}{(2)-(1)}}}")) → Pg3FLaTeX((("\text{slope\textcolor{#000099}{ =\frac{" * SUG) * "}{1}}}")) → Pg3GLaTeX("\text{Subtract.}") → Pg3G2LaTeX((("\text{slope\textcolor{#000099}{ =" * SUG) * "}}")) → Pg3HLaTeX("\text{Simplify.}") → Pg3H2LaTeX("\text{graphed values.}") → Pg4CLaTeX("\text{\textcolor{#000099}{x}-coordinate.}") → Pg4EMod(F1, CF1) → CondIf(Cond ≠ 0, LaTeX["\text{number of shirts needs to be a whole number.}"]) → Pg4JVector(G0, Gtry) → VectorLaTeX((("\text{Use the slope to determine how many shirts can be purchased for \textcolor{#000099}{\textdollar" * S3) * "}.}")) → Pg4ALaTeX((("\text{The number of shirts that can be purchased for \textcolor{#000099}{\textdollar" * S3) * "} can be estimated from the}")) → Pg4BOrthogonalLine(GF, xAxis) → mOrthogonalLine(GF, yAxis) → nLaTeX((((("\text{then adding \textcolor{#000099}{" * S2) * "} to include the \textcolor{#000099}{\textdollar") * S2) * "} shipping fee.}")) → Pg1C1LaTeX((("\text{The total cost can be determined by multiplying the number of shirts by \textcolor{#000099}{" * S1) * "} and}")) → Pg1COrthogonalLine(DUMMY, m) → pOrthogonalLine(DUMMY, p) → qIntersect(n, q) → MIntersect(m, p) → NSegment(M, GF) → rSegment(GF, N) → sLaTeX((("\text{Cost of a shirt=\textdollar" * S1) * "}")) → DKT1LaTeX((("\text{Standard shipping fee=\textdollar" * S2) * "}")) → DKT2VerticalText("\text{Cost \textcolor{#000099}{(\textdollar)}") → VertYaxisLaTeX("\text{Let \textcolor{#000099}x represent the number of shirts and \textcolor{#000099}y represent the cost in dollars.}") → Pg2CLaTeX((("\text{problem that each shirt costs \textcolor{#000099}{\textdollar" * SUG) * "}.}")) → Pg3JTableText({{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|_") → TableLaTeX((("\text{How many shirts can be purchased for \textcolor{#000099}{\textdollar " * S3) * "}? Assume there is no sales tax.}")) → Question2LaTeX((((("\text{Cost of a shirt:\textcolor{#000099}{\textdollar" * S1) * "}; Standard shipping fee: \textcolor{#000099}{\textdollar") * S2) * "}}")) → Question1LaTeX((("\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) * "})}")) → Pg3BLaTeX((("\text{and (\textcolor{#000099}{x₂,y₂}) be (\textcolor{#000099}{2," * G2) * "}). Substitute these values into the slope formula to find the slope}")) → Pg3CLaTeX("\text{of the line, and then simplify.}") → Pg3DLaTeX((((("\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₂}.}")) → Pg3F2LaTeX((((("\text{The slope is \textcolor{#000099}{" * SUG) * "}, or \textcolor{#000099}{\textdollar") * SUG) * "} per shirt. This verifies the given information in the}")) → Pg3ILaTeX((("\text{Find \textcolor{#000099}{" * S3) * "} on the \textcolor{#000099}{y}-axis, and then look to the right to determine the corresponding }")) → Pg4DLaTeX((((("\text{From the graph, it appears that for \textcolor{#000099}{\textdollar" * S3) * "}, about \textcolor{#000099}{") * CF1) * "} shirts can be purchased.}")) → Pg4FLaTeX((("\text{Using the rate of \textcolor{#000099}{\textdollar" * S1) * "} per shirt, the number of shirts can also be found by first subtracting}")) → Pg4GLaTeX((((((((("\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) * "};}")) → Pg4HIf(Cond ≠ 0, LaTeX[(((("\text{however, in the context of this problem, \textcolor{#000099}{" * F1) * "} must be rounded down to \textcolor{#000099}{") * CF1) * "}, since the}")]) → Pg4ILaTeX("\text{\mathbf{slope} the measure of the rate of change of one variable with respect to another}") → WTK1LaTeX("\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}.}") → WTK2LaTeX((("\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.