Example Solution

Authors: Bill Davis, Horacio Porta, and Jerry Uhl ©1999

Producer: Bruce Carpenter

Publisher: Math Everywhere, Inc. Distributor: Wolfram Research, Inc.
EXAMPLE
SOLUTION

G.1) Line fundamentals*

G.1.e)

Here are two points {1,3} and {3,2}:

    point1 = Graphics[{Blue, PointSize[0.03],
      Point[{1,3}]}];
    point2 = Graphics[{Blue,PointSize[0.03],
      Point[{3,2}]}];

    twopoints =
    Show[point1, point2, PlotRange->{{0,5},{0,5}},
      AxesOrigin->{0,0}, Axes-&gtTrue, AxesLabel->{"x","y"},
      &AspectRatio-&gtAutomatic];

Find a formula for the line function whose plot hits both points.

Confirm your answer with a plot.

My function will be called House and its variable will be dog. It is supposed to be a line...

    Clear[House,dog,a,b]
    House[dog_] = a dog + b
    b + a dog

According to these points, when dog = 1, House should equal 3, and when dog = 3, House should = 2.

    House[1]
    a + b

That should equal 3.

    House[1]
    a + b

That should equal 2.

I need to find a and b that will make these equal what they are supposed to.

    Solve[{a + b == 3, 3 a + b == 2}, {a,b}]
    a = -1/2
    b = 7/2
    -1/2
    7/2

Here's the function...

    House[dog]
    7/2 - dog/2

If I plot this function, it should go through those two points. Let's see...

    myfunction = Plot[House[x], {x,0,5}]

    

    Show[twopoints,myfunction]

    

I say, I am correct. What do you say?


Send questions or comments to website@socrates.math.ohio-state.edu Copyright © 1998-2009, Calculus&Mathematica