lagrange: Method of Lagrange Multipliers

Exercise template for minimizing a linear objective function with two arguments subject to a Cobb-Douglas-type constraint. Both the parameters of the functions and the exact question (argument 1 vs. argument 2 vs. function value in optimum) are drawn randomly.

Name:
lagrange
Type:
Description:
Computing the solution to a cost minimization problem subject to an output constraint where the production fuction with arguments capital and labor is of Cobb-Douglas type. As num exercises have only a single numeric solution (and to make test takers read the exercise carefully), one of three natural quantities in the optimum is selected randomly as the question: the first argument (capital), the second argument (labor), or the minimal function value (costs). The optimal solution is also displayed graphically using a contour plot.
Solution feedback:
Yes
Randomization:
Random numbers, text blocks, and graphics
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
Yes
Other supplements:
No
Raw: (1 random version)
PDF:
lagrange-Rnw-pdf
lagrange-Rmd-pdf
HTML:
lagrange-Rnw-html
lagrange-Rmd-html

(Note that the HTML output contains mathematical equations in MathML. It is displayed by browsers with MathML support like Firefox or Safari - but not Chrome.)

Demo code:

library("exams")

set.seed(1090)
exams2html("lagrange.Rnw")
set.seed(1090)
exams2pdf("lagrange.Rnw")

set.seed(1090)
exams2html("lagrange.Rmd")
set.seed(1090)
exams2pdf("lagrange.Rmd")