lagrange: Method of Lagrange Multipliers
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
numexercises 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.
Random numbers, text blocks, and graphics
Verbatim R input/output:
Raw: (1 random version)
(Note that the HTML output contains mathematical equations in MathML, rendered by MathJax using ‘mathjax = TRUE’. Instead it is also possible to use ‘converter = “pandoc-mathjax”’ so that LaTeX equations are rendered by MathJax directly.)
library("exams") set.seed(403) exams2html("lagrange.Rmd", mathjax = TRUE) set.seed(403) exams2pdf("lagrange.Rmd") set.seed(403) exams2html("lagrange.Rnw", mathjax = TRUE) set.seed(403) exams2pdf("lagrange.Rnw")