Basic Model

Profitv:=α p+e (1-α)p-(1-e)θ-k*(e*e)-cv

Profits:=-α p+e(F-(1-α)p)-cs

Optimal e

D[Profitv,e]

Solve[-2 e k+p (1-α)+θ==0,e]

{{e->((p-p α+θ)/(2 k))}}

the breakeven of insurance company

Profiti=r(α p+cs)-(1-e)β(α p+cs)

Simplify[Profiti]

Solve[%==0,r]

e:=((θ-α p+p)/(2 k))

Profits

Optimal a

D[Profits,α]

Simplify[-p-((p (F-p (1-α)))/(2 k))+((p (p-p α+θ))/(2 k))]

Solve[-((p (F+2 k-2 p+2 p α-θ))/(2 k))==0,α]

α:=((-F-2 k+2 p+θ)/(2 p))

Profits

Simplify[-cs+(1/2) (F+2 k-2 p-θ)+(((p+(1/2) (F+2 k-2 p-θ)+θ) (F-p (1-((-F-2 k+2 p+θ)/(2 p)))))/(2 k))]

(((F^2)-8 cs k+4 F k+4 (k^2)-8 k p+2 F θ-4 k θ+(θ^2))/(8 k))
Factor[%]

Profit

Profitv:=α p+e (1-α)p-(1-e)θ-k*(e*e)-cv

Profits:=-α p+e(F-(1-α)p)-cs

e:=((θ-α p+p)/(2 k))
α:=((-F-2 k+2 p+θ)/(2 p))

e

Simplify[((p+(1/2) (F+2 k-2 p-θ)+θ)/(2 k))]

α

Profits

Simplify[-cs+(1/2) (F+2 k-2 p-θ)+(((p+(1/2) (F+2 k-2 p-θ)+θ) (F-p (1-((-F-2 k+2 p+θ)/(2 p)))))/(2 k))]

Profitv

Simplify[-cv+(1/2) (-F-2 k+2 p+θ)-((((p+(1/2) (F+2 k-2 p-θ)+θ))^2)/(4 k))+((p (p+(1/2) (F+2 k-2 p-θ)+θ) (1-((-F-2 k+2 p+θ)/(2 p))))/(2 k))-θ (1-((p+(1/2) (F+2 k-2 p-θ)+θ)/(2 k)))]

Insurance Model

Profitv:=α p+e (1-α)p-(1-e)θ-k*(e*e)-cv
Profiti:=r(α p+cs)-β(1-e)(α p+cs)

Profits:=-α p+e(F-(1-α)p)-r(α p+cs)-cs+β (1-e)(α p+cs)

Optimal e

D[Profitv,e]

Solve[%==0,e]

e:=((θ-α p+p)/(2 k))

r:=((2 k β-p β+p α β-β θ)/(2 k))

Profits:=-α p+e(F-(1-α)p)-r(α p+cs)-cs+β (1-e)(α p+cs)

Profits

Simplify[-cs-p α+(((F-p (1-α)) (p-p α+θ))/(2 k))-(((cs+p α) (2 k β-p β+p α β-β θ))/(2 k))+(cs+p α) β (1-((p-p α+θ)/(2 k)))]

((-2 cs k+F (p-p α+θ)-p (p (((-1+α))^2)+2 k α+θ-α θ))/(2 k))
D[%,p]

Solve[%==0,p]

D[((-2 cs k+F (p-p α+θ)-p (p (((-1+α))^2)+2 k α+θ-α θ))/(2 k)),α]

Solve[%==0,α]

{{α->((-F-2 k+2 p+θ)/(2 p))}}
p:=((F-F α-2 k α-θ+α θ)/(2 (((-1+α))^2)))

e:=((θ-α p+p)/(2 k))

r:=((2 k β-p β+p α β-β θ)/(2 k))

Profits:=-α p+e(F-(1-α)p)-r(α p+cs)-cs+β (1-e)(α p+cs)
Profits

Simplify[%8]

D[(((F^2) (((-1+α))^2)-8 cs k (((-1+α))^2)+2 F (-1+α) (2 k α+(-1+α) θ)+(((2 k α+θ-α θ))^2))/(8 k (((-1+α))^2))),α]

Simplify[%12]

Solve[%==0,α]

α:=((F-θ)/(F+2 k-θ))

p

Optimal α

Profits

Simplify[-cs-p α-r (cs+p α)+(((F-p (1-α)) (p-p α+θ))/(2 k))+(cs+p α) β (1-((p-p α+θ)/(2 k)))]

D[Profits,α]

Simplify[-p-p r-((p (F-p (1-α)))/(2 k))+((p (cs+p α) β)/(2 k))+((p (p-p α+θ))/(2 k))+p β (1-((p-p α+θ)/(2 k)))]

Solve[%==0,α]

{{α->((F+2 k-2 p+2 k r-cs β-2 k β+p β-θ+β θ)/(2 p (-1+β)))}}
α:=((F+2 k-2 p+2 k r-cs β-2 k β+p β-θ+β θ)/(2 p (-1+β)))

e

Simplify[((p+θ-((F+2 k-2 p+2 k r-cs β-2 k β+p β-θ+β θ)/(2 (-1+β))))/(2 k))]

Profitv

Simplify[%16]

Profits

Simplify[%18]

Block chain

Profitv:=α p+eb (1-α)p-(1-eb)θ-k*(eb*eb)-cv-cb
Profits:=-α p+eb(F-(1-α)p)-rb(α p+cs)-cs+β (1-eb)(α p+cs)

D[Profitv,eb]

Solve[%==0,eb]

eb:=((p-p α+θ)/(2 k))

Profits

D[%,α]

Solve[%==0,α]

α:=((F+2 k-2 p+2 k rb-cs β-2 k β+p β-θ+β θ)/(2 p (-1+β)))

eb

Simplify[((p+θ-((F+2 k-2 p+2 k rb-cs β-2 k β+p β-θ+β θ)/(2 (-1+β))))/(2 k))]

Profitv

Factor[%20]

Simplify[%21]

Profits

Simplify[%23]

Factor[%24]