3.5 Systems of Equations

If we have two linear equations:
y = (Subscript[m, 1])x+(Subscript[b, 1]) and y=(Subscript[m, 2])x+(Subscript[b, 2]) when they intersect, their y coordinates are the same, so therefore, (Subscript[m, 1])x+(Subscript[b, 1])= (Subscript[m, 2])x+(Subscript[b, 2]).  This equation can be solved for the variable x.

Example 3.9

We are given two conditions for the picnic: (1) Total amount to spend was $56.00, and (2) four times as many drinks as pizzas.  Other information needed: pizzas cost $12, and drinks cost $0.50.
The equations:
(1) 12P+0.5D=56
(2) D = 4P
The second equation is solve for as D = D(P), so we should isolate D in the first equation.

Solve[12P+0.5D==56,D]

Plot[{2.` (56.` -12.` P),4P},{P,0,5},PlotStyle->{{Blue, Thickness[0.004]},{Red, Thickness[0.004]}}, PlotLegends->{"Cost EQN","Relation EQN"}, AxesLabel->{"Pizzas","Drinks"}]

The graph shows that the two lines intersect near (or at) P = 4.  We can use the Solve command below to get the correct answer:

Solve[{12P+0.5D==56,D==4P},{P,D}]

So the correct solution to this problem is to buy 4 pizzas and 16 drinks.

Exercise 1

We have $30,000 to invest.  Must be nice, right?  We are going to safely invest in two types of bonds: municipal and treasury.  The sum investment must total the $30,000 (see equation (1)) and we are to invest in twice as many treasury bonds (see equation (2)).  Here M and T are the amounts to invest in each, respectively.  The equations:
(1) M+T = 30000
(2) T = 2M

Solve[{M+T==30000,T==2M},{T,M}]

Plot[{2M,30000-M},{M,0,30000},PlotStyle->{{Blue, Thickness[0.004]},{Red, Thickness[0.004]}}, PlotLegends->{"Total Investment EQN","Relation EQN"}, AxesLabel->{"Municipal Bonds","Treasury Bonds"}]

The solution is presented both graphically and algebraically above, and in both methods, we see that the investment scheme should be $20,000 in treasurer bonds, and $10,000 in municipal bonds.

Exercise 9

We are given that there are 255 foxes and 104 rabbits initially. The fox population grows at a rate of 33 per year, and the rabbits grow at a rate of 53 per year.  Thus, as formulas we have:
(1) F = 255+33t
(2) R = 104+53t
where t is measured in years.

To solve for the time time where the populations are equal, we set F=R, then solve for the variable t.  This results in a value of t=7.55 years, and the number of foxes and rabbits are both 504 (or so).

Clear[t]

Fo[t_]:=255+33t;
Ra[t_]:=104+53t;

NSolve[Fo[t]==Ra[t],t]

Fo[7.55]

Ra[7.55]