// Numbas version: exam_results_page_options {"name": "Differentiation: Chain Rule 14", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Differentiation: Chain Rule 14", "tags": [], "metadata": {"description": "

Calculating the derivative of a function of the form $\\sin(e^{ax})+b e^{\\cos(cx)}$ using the chain rule.

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

Calculate the derivative of $y=\\simplify[all,fractionNumbers]{sin(e^({a}x))+{b}e^(cos({c}x))}$.

\n

", "advice": "

If we have a function of the form $y=f(g(x))$, sometimes described as a function of a function, to calculate its derivative we need to use the chain rule:

\n

\\[ \\frac{dy}{dx} = \\frac{du}{dx} \\times \\frac{dy}{du}.\\]

\n

\n

This can be split up into steps:

\n\n

In this case, we have a function of the form $y=f_1(g_1(x))+f_2(g_2(x))$. We want to follow this process for each function, and then add the results together to obtain $\\frac{dy}{dx}$. 

\n

So, for $y=\\simplify[all]{sin(e^({a}x))+{b}e^(cos({c}x))}$, \\[g_1(x)=\\simplify[all]{e^({a}x)}, \\quad g_2(x)=\\simplify[all]{cos({c}x)}.\\]

\n

If we now set $u_1=g_1(x)$ and $u_2=g_2(x)$, we can rewrite $y$ in terms of $u_1$ and $u_2$ such that $y=f_1(u_1)+f_2(u_2)$:

\n

\\[y=\\simplify[all]{sin(u_1)+{b}e^(u_2)}.\\]

\n

Next, we calculate the derivatives $\\frac{du_1}{dx}$, $\\frac{du_2}{dx}$, $\\frac{df_1}{du_1}$ and $\\frac{df_2}{du_2}$:

\n

\\[ \\begin{split} &\\, \\frac{du_1}{dx}=\\simplify[all]{{a}e^({a}x)}, \\quad &\\,\\frac{df_1}{du_1}=\\simplify[all]{cos(u_1)} \\\\ \\\\&\\,\\frac{du_2}{dx}=\\simplify[all]{-{c}sin({c}x)}, \\quad &\\,\\frac{df_2}{du_2}=\\simplify[all]{{b}e^(u_2)}. \\end{split}\\]

\n

Plugging these into the extended chain rule:

\n

\\[ \\begin{split} \\frac{dy}{dx} &= \\frac{du_1}{dx} \\times \\frac{df_1}{du_1} +\\frac{du_2}{dx} \\times \\frac{df_2}{du_2}, \\\\\\\\&=\\simplify[all]{{a}e^({a}x)} \\times\\simplify[all]{cos(u_1) +{-c}sin({c}x)} \\times\\simplify[all]{{b}e^(u_2)} . \\end{split} \\]

\n

Finally, we need to express $\\frac{dy}{dx}$ only in terms of $x$, so we must replace the $u_1$ and $u_2$ terms using the initial substitutions $u_1=\\simplify[all]{e^({a}x)}$ and $u_2=\\simplify[all]{cos({c}x)}$:

\n

\\[ \\frac{dy}{dx} =\\simplify[all,fractionNumbers]{{a}e^({a}x)cos(e^({a}x))+{-c*b}sin({c}x)e^(cos({c}x))}.\\]

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..10)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c"], "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": "

$\\frac{dy}{dx}=$[[0]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a}e^({a}x)cos(e^({a}x))-{b*c}sin({c}x)e^(cos({c}x))", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}