prologues:=2; beginfig(1); u:=0.025cm; pickup pencircle scaled 1; pair origin,top_left,bottom_right; origin=(320u,860u); top_left=(320u,1060u); bottom_right=(580u,860u); path vert_axis,horiz_axis,budget_set; vert_axis=origin--top_left; draw vert_axis; label.lft(btex $y$ etex,(320u,1060u)); label.bot(btex $x$ etex,(580u,860u)); label.llft(btex $0$ etex,origin); horiz_axis= origin--bottom_right; draw horiz_axis; pair upper_left_budget_line,bottom_right_budget_line; upper_left_budget_line=7/8[origin,top_left]; bottom_right_budget_line=3/4[origin,bottom_right]; draw upper_left_budget_line--bottom_right_budget_line; label.lft(btex $W$ etex,upper_left_budget_line); label.bot(btex ${W}\over{p}$ etex,bottom_right_budget_line); pair base_point; base_point:=(15u,0); director:=angle(bottom_right_budget_line-upper_left_budget_line); pair anchor; anchor:= (7/8)[upper_left_budget_line,bottom_right_budget_line]; drawarrow anchor--anchor+base_point rotated (director+90); label.rt(btex $(p,1)$ etex,anchor+base_point rotated (director+90)); pair tangency,left_wing,right_wing; tangency:=(1/2)[upper_left_budget_line,bottom_right_budget_line]; left_wing:=(-40u,90u); right_wing:=(90u,-40u); draw (tangency+left_wing)..(tangency+(2u,2u)){dir director}..(tangency+(25u,-15u))..(tangency+right_wing) withcolor green; dotlabel.urt(btex $(x^\ast,y^\ast) $ etex,(tangency+(1u,1u))); %second budget line pair newlbl,newtop,newtan,nlw,nrw,newp,newa; newlbl:=(6/9)[origin,bottom_right_budget_line]; newtan:=(6/4)[newlbl,tangency]; newtop:=2[newlbl,tangency]; draw newlbl--newtop withcolor red; nlw:=tangency+left_wing+(13u,0); nrw:=tangency+right_wing+(0,10u); newdir:=angle(newlbl-newtan); draw nlw..newtan{dir newdir}..nrw withcolor blue; dotlabel.rt (btex $(x^\prime,y^\prime)$ etex, newtan); newp:=(3/4)[newtan,newlbl]; dotlabel.lft(btex $(x^0,y^0)$ etex,newp); newa:=(7/8)[newtan,newlbl]; drawarrow newa--newa+base_point rotated (newdir+90); label.lrt (btex $(p^\prime,1)$ etex,newa+base_point rotated (newdir+90)); label.bot (btex $W^\prime \over p^\prime $ etex,newlbl); endfig; end