Qurak

Rent or buy: a break-even model

Workflow 5 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
rentCost[m_] := rent m
buyCost[m_] := closing + (payment + maintenance) m

No output - this step sets something up for the next one.

Step 2
breakEven = First[Solve[rentCost[m] == buyCost[m], m]]
Output
{m -> closing/(-maintenance - payment + rent)}
Step 3
D[m /. breakEven, rent]
Output
-(closing/(-maintenance - payment + rent)^2)
Step 4
assumptions = {closing -> 40000, maintenance -> 500, rent -> 2600, payment -> 1900};
monthsToBreakEven = N[m /. breakEven /. assumptions]
Output
200.
Step 5
Plot[{rentCost[m] /. assumptions, buyCost[m] /. assumptions}, {m, 0, 300}]
Output
-Graphics-

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client