Skip to main content
Bumped by Community user
Formatted special characters
Source Link
MarcoB
  • 67.7k
  • 18
  • 96
  • 198
$Assumptions -> {{\[Beta]β, \[Theta]θ, \[Alpha]α, r, p, \[Epsilon]ϵ, \[Sigma]σ, \[Delta]δ} > 0, Element [{H, \[Beta]β, \[Theta]θ, \[Alpha]α, r, p, \[Epsilon]ϵ, \[Sigma]σ, \[Delta]δ}, Reals], {\[Beta]β, \[Theta]θ, \[Alpha]α, r, p, \[Epsilon]ϵ, \[Sigma]σ, \[Delta]δ} < 1, H > 0, \[Epsilon]ϵ > \[Sigma]σ, \[Alpha]α < r};

Y = 1000;
\[Beta]β = 0.95;
\[Theta]θ = 10;
\[Alpha]α = 0.05;
r = 0.05;
\[Epsilon]ϵ = 1.2;
\[Sigma]σ = 0.2;
\[Delta]δ = 0.3;
p = 0.51;

g1[H_] := Max[0, ((((1 - \[Delta]δ)*Y)/(r + \[Alpha]α)) - H)]*((((1 - \[Delta]δ)*Y)/(r + \[Alpha]α)) - H)^(-1)

h1[H_] :=  Min[0, ((((1 - \[Delta]δ)*Y)/(r + \[Alpha]α)) - H)]*((((1 - \[Delta]δ)*Y)/(r + \[Alpha]α)) - H)^(-1)

A = Maximize[{(1 + \[Beta]β * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*Hθ*H)^(1 - 
             1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ))) /(1 - 1/\[Sigma]σ) +  \[Beta]*pβ*p *
     g1[H] *(((Y - (r + \[Alpha]α)*H)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*θ*
             H)^(1 - 1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ)) ) /(1 - 1/\[Sigma]σ) + \[Beta]*pβ*p *
     h1[H] *(((\[Delta]*Yδ*Y)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*5000θ*5000)^(1 - 
             1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ)) ) /(1 - 1/\[Sigma]σ), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0}, {H}]



B = Maximize[{(1 + \[Beta]β * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*Hθ*H)^(1 - 
             1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ))) /(1 - 1/\[Sigma]σ) +  \[Beta]*pβ*p *
     g1[H] *(((Y - (r + \[Alpha]α)*H)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*θ*
             H)^(1 - 1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ)) ) /(1 - 1/\[Sigma]σ) + \[Beta]*pβ*p *
     h1[H] *(((\[Delta]*Yδ*Y)^(1 - 1/\[Epsilon]ϵ) + (\[Theta]*5000θ*5000)^(1 - 
             1/\[Epsilon]ϵ))^((1 - 1/\[Sigma]σ)/(1 - 
            1/\[Epsilon]ϵ)) ) /(1 - 1/\[Sigma]σ), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0, 
   H <= 14000}, {H}]

```
$Assumptions -> {{\[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]} > 0, Element [{H, \[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]}, Reals], {\[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]} < 1, H > 0, \[Epsilon] > \[Sigma], \[Alpha] < r};

Y = 1000;
\[Beta] = 0.95;
\[Theta] = 10;
\[Alpha] = 0.05;
r = 0.05;
\[Epsilon] = 1.2;
\[Sigma] = 0.2;
\[Delta] = 0.3;
p = 0.51;

g1[H_] := Max[0, ((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)]*((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)^(-1)

h1[H_] :=  Min[0, ((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)]*((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)^(-1)

A = Maximize[{(1 + \[Beta] * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]) + (\[Theta]*H)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon]))) /(1 - 1/\[Sigma]) +  \[Beta]*p *
     g1[H] *(((Y - (r + \[Alpha])*H)^(1 - 1/\[Epsilon]) + (\[Theta]*
             H)^(1 - 1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]) + \[Beta]*p *
     h1[H] *(((\[Delta]*Y)^(1 - 1/\[Epsilon]) + (\[Theta]*5000)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0}, {H}]



B = Maximize[{(1 + \[Beta] * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]) + (\[Theta]*H)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon]))) /(1 - 1/\[Sigma]) +  \[Beta]*p *
     g1[H] *(((Y - (r + \[Alpha])*H)^(1 - 1/\[Epsilon]) + (\[Theta]*
             H)^(1 - 1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]) + \[Beta]*p *
     h1[H] *(((\[Delta]*Y)^(1 - 1/\[Epsilon]) + (\[Theta]*5000)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0, 
   H <= 14000}, {H}]

```
$Assumptions -> {{β, θ, α, r, p, ϵ, σ, δ} > 0, Element [{H, β, θ, α, r, p, ϵ, σ, δ}, Reals], {β, θ, α, r, p, ϵ, σ, δ} < 1, H > 0, ϵ > σ, α < r};

Y = 1000;
β = 0.95;
θ = 10;
α = 0.05;
r = 0.05;
ϵ = 1.2;
σ = 0.2;
δ = 0.3;
p = 0.51;

g1[H_] := Max[0, ((((1 - δ)*Y)/(r + α)) - H)]*((((1 - δ)*Y)/(r + α)) - H)^(-1)

h1[H_] :=  Min[0, ((((1 - δ)*Y)/(r + α)) - H)]*((((1 - δ)*Y)/(r + α)) - H)^(-1)

A = Maximize[{(1 + β * (1 - 
          p))*(((Y - r*H)^(1 - 1/ϵ) + (θ*H)^(1 - 
             1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ))) /(1 - 1/σ) +  β*p *
     g1[H] *(((Y - (r + α)*H)^(1 - 1/ϵ) + (θ*
             H)^(1 - 1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ)) ) /(1 - 1/σ) + β*p *
     h1[H] *(((δ*Y)^(1 - 1/ϵ) + (θ*5000)^(1 - 
             1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ)) ) /(1 - 1/σ), 
   H  0, (Y - r*H)  0}, {H}]



B = Maximize[{(1 + β * (1 - 
          p))*(((Y - r*H)^(1 - 1/ϵ) + (θ*H)^(1 - 
             1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ))) /(1 - 1/σ) +  β*p *
     g1[H] *(((Y - (r + α)*H)^(1 - 1/ϵ) + (θ*
             H)^(1 - 1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ)) ) /(1 - 1/σ) + β*p *
     h1[H] *(((δ*Y)^(1 - 1/ϵ) + (θ*5000)^(1 - 
             1/ϵ))^((1 - 1/σ)/(1 - 
            1/ϵ)) ) /(1 - 1/σ), 
   H  0, (Y - r*H)  0, 
   H <= 14000}, {H}]

```
Source Link

Maximize - Non binding constraint is changing the result

When I add a non-binding constraint to a maximization problem the result changes. I don't understand why.

Below you can find the code that I am using.

For the maximization A, H = 6837.66 For the maximization B (equal to A + constraint of H less or equal to 14000), H = 5716.08

If the solution in A is already below 14000, the solution should not change. Why is this happening?

Thank you!

$Assumptions -> {{\[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]} > 0, Element [{H, \[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]}, Reals], {\[Beta], \[Theta], \[Alpha], r, p, \[Epsilon], \[Sigma], \[Delta]} < 1, H > 0, \[Epsilon] > \[Sigma], \[Alpha] < r};

Y = 1000;
\[Beta] = 0.95;
\[Theta] = 10;
\[Alpha] = 0.05;
r = 0.05;
\[Epsilon] = 1.2;
\[Sigma] = 0.2;
\[Delta] = 0.3;
p = 0.51;

g1[H_] := Max[0, ((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)]*((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)^(-1)

h1[H_] :=  Min[0, ((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)]*((((1 - \[Delta])*Y)/(r + \[Alpha])) - H)^(-1)

A = Maximize[{(1 + \[Beta] * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]) + (\[Theta]*H)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon]))) /(1 - 1/\[Sigma]) +  \[Beta]*p *
     g1[H] *(((Y - (r + \[Alpha])*H)^(1 - 1/\[Epsilon]) + (\[Theta]*
             H)^(1 - 1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]) + \[Beta]*p *
     h1[H] *(((\[Delta]*Y)^(1 - 1/\[Epsilon]) + (\[Theta]*5000)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0}, {H}]



B = Maximize[{(1 + \[Beta] * (1 - 
          p))*(((Y - r*H)^(1 - 1/\[Epsilon]) + (\[Theta]*H)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon]))) /(1 - 1/\[Sigma]) +  \[Beta]*p *
     g1[H] *(((Y - (r + \[Alpha])*H)^(1 - 1/\[Epsilon]) + (\[Theta]*
             H)^(1 - 1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]) + \[Beta]*p *
     h1[H] *(((\[Delta]*Y)^(1 - 1/\[Epsilon]) + (\[Theta]*5000)^(1 - 
             1/\[Epsilon]))^((1 - 1/\[Sigma])/(1 - 
            1/\[Epsilon])) ) /(1 - 1/\[Sigma]), 
   H \[GreaterSlantEqual] 0, (Y - r*H) \[GreaterSlantEqual] 0, 
   H <= 14000}, {H}]

```