From f14f389d5cf03805ca0a679fbb64b31b32589374 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Tue, 5 Mar 2019 12:00:14 -0500 Subject: [PATCH] NLDS alternative function: make the function X with respect to K --- src/Graph.js | 8 ++++---- src/editors/NonLinearDemandSupplyEditor.jsx | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Graph.js b/src/Graph.js index a61b81bf..7f485aff 100644 --- a/src/Graph.js +++ b/src/Graph.js @@ -407,8 +407,8 @@ class NonLinearDemandSupplyGraph extends Graph { f2Shadow = function(x) { return alpha * (me.options.gCobbDouglasAInitial * - me.options.gCobbDouglasKInitial ** (alpha - 1)) * - (x ** (1 - alpha)); + x ** (alpha - 1)) * + (me.options.gCobbDouglasKInitial ** (1 - alpha)); }; } @@ -467,8 +467,8 @@ class NonLinearDemandSupplyGraph extends Graph { f = function(x) { return alpha * (me.options.gCobbDouglasA * - me.options.gCobbDouglasK ** (alpha - 1)) * - (x ** (1 - alpha)); + x ** (alpha - 1)) * + (me.options.gCobbDouglasK ** (1 - alpha)); }; } diff --git a/src/editors/NonLinearDemandSupplyEditor.jsx b/src/editors/NonLinearDemandSupplyEditor.jsx index d7fccbb2..c64647bc 100644 --- a/src/editors/NonLinearDemandSupplyEditor.jsx +++ b/src/editors/NonLinearDemandSupplyEditor.jsx @@ -17,7 +17,7 @@ export default class NonLinearDemandSupplyEditor extends React.Component { } render() { const func1 = `MP_N = (1 - α)${this.props.gCobbDouglasAName}${this.props.gCobbDouglasKName}^α N^{-α}`; - const func2 = `MP_${this.props.gCobbDouglasKName} = α${this.props.gCobbDouglasAName}${this.props.gCobbDouglasKName}^{α - 1} N^{1 - α}`; + const func2 = `MP_${this.props.gCobbDouglasKName} = α${this.props.gCobbDouglasAName}K^{α - 1} N^{1 - α}`; return (
{this.props.isInstructor && ( @@ -111,7 +111,9 @@ export default class NonLinearDemandSupplyEditor extends React.Component {