// Numbas version: finer_feedback_settings {"name": "Optimisation: Find quantity to maximise profits", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Optimisation: Find quantity to maximise profits", "tags": [], "metadata": {"description": "

Given price, marginal cost and fixed cost, find the quantity that maximises profits.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

A demand function for a generic good, where $P$ is the price and $q$ is the quantity is: $P = \\var{p} - q$. The Marginal Cost is given by, $MC = \\simplify{{x}q+{y}}$, and fixed cost is, $FC = \\var{z}$. Find the quantity $q$ to maximise profits.

", "advice": "

The total profit can be found by calculating the total revenue (price times quantity) subtract the total cost (marginal cost times quantity add fixed costs).

\n

As an equation this looks like:

\n

\\[ \\begin{split} \\pi &= TR - TC \\\\ &= Pq - (MC \\times q + FC) \\end{split} \\]

\n

Using the equations in this question we have:

\n

\\[ \\pi = \\simplify{({p} -q)q - ({x}q+{y})q - {z}} \\]

\n

Collecting like terms:

\n

\\[ \\pi = \\simplify[!noLeadingMinus]{-{x+1}q^2 + {p-y}q +{z}} \\]

\n

Differentiating with respect to $q$ gives:

\n

\\[ \\frac{d\\pi}{dq} = \\var{-2*(x+1)}q + \\var{p-y} \\]

\n

Using the first order condition $ \\frac{d\\pi}{dq} = 0 $ we have:

\n

\\[ \\var{-2*(x+1)}q + \\var{p-y}= 0 \\]

\n

Solving to find $q$:

\n

\\[ q = \\var{-(p-y)/(-2*(x+1))} \\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"y": {"name": "y", "group": "Ungrouped variables", "definition": "random(20..60)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(100..400)", "description": "", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(1..y-10)", "description": "", "templateType": "anything", "can_override": false}, "z": {"name": "z", "group": "Ungrouped variables", "definition": "random(10..50)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "-(p-y)/(-2*(x+1))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "2(x+1)|(p-y) ", "maxRuns": "500"}, "ungrouped_variables": ["p", "y", "x", "z", "ans"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$q$ = [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "resources": []}]}], "contributors": [{"name": "Ed Southwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2415/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}