Question 3:

Solve the intertemporal allocation problem in Q2 assuming p(y) = 200 – y, x0 = 100, and ρ = 0.85. Calculate the present value of profits at the optimal allocation and verify that a deviation away from this allocation will reduce profits.

Declare global variables: Total available resource (x) = 100 & Discount factor (rho) = 0.85

x <- 100
rho <- 0.85

Function to get optimal value of extraction in period 0

extract_1 <- function(y){
  200-y-(1.2*(y^0.2)/(10+x)) - rho*(200-(100-y)-(1.2*((100-y)^0.2)/(10+x)))
}

Call the function and pass the limits of y

y <- uniroot.all(extract_1, c(0,100))
print(paste("Optimal extraction in period 1: ",round(y,2)))
## [1] "Optimal extraction in period 1:  62.16"

Function to get Present value of Profit

PVP <- function(y0,x){
  y1 <- x-y0
  p0 <- 200-y0
  p1 <- 200-y1
  c0 <- (y0^1.2)/(10+x)
  c1<- (y1^1.2)/(10+x)
  profit = p0*y0 -c0 + rho*(p1*y1 -c1)
}

Call the function and pass optimal y to get the Present value of Profit (PVP).

pvp1<- PVP(y,x)
print(paste("Present value of Profit: ",round(pvp1,2)))
## [1] "Present value of Profit:  13781.98"

To test the PVP for different values of y

df <- data.frame("Extraction" = c("y","y+20","y-20","y+30","y-30"), 
                        "PVP" = c(PVP(y,x),PVP(y+20,x),PVP(y-20,x),PVP(y+30,x),PVP(y-30,x)))

df$Remarks <- ifelse(df$PVP < pvp1,"Not Optimal",
                    ifelse(df$PVP > pvp1,"Not Optimal","Optimal" ))

Table:

df %>%
  kbl(caption = "Changes in PV of profit with extraction") %>%
  kable_classic(full_width = F, html_font = "Cambria")%>%
  kable_styling(bootstrap_options = c("striped", "hover"))
Changes in PV of profit with extraction
Extraction PVP Remarks
y 13781.98 Optimal
y+20 12442.06 Not Optimal
y-20 13641.83 Not Optimal
y+30 11217.06 Not Optimal
y-30 13016.73 Not Optimal