Message Boards Message Boards

0
|
3090 Views
|
9 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Problem from Analytic Geometry.

Posted 4 years ago

A problem in my Analytitic Geometry text states: "The line segment from (-5,1) to (1,3) is extended 10 units. Find the coordinates of the end point." How do I use Mathematica to solve problems such as this? Along the same lines, how do I get Mathematica to plot in X-Y fashion? I asked (in free-form) to plot a line from (2,3) to (-6,10), and all I got was a straight line without the X-Y framework.Thanks for help anyone can provide. Incidentally, I'm not taking a course containing this problem; I'm just a math-hobbyist, so it's not a matter of cheating.

POSTED BY: Carl Adkins
9 Replies
Posted 4 years ago

I really appreciate all the help I have received on this problem. Even though I have had Mathematica quite a while, I'm just now finding time to learn it. Free-form is great, but, if one doesn't know how to word a particular question, it gets a little frustrating.

POSTED BY: Carl Adkins
Posted 4 years ago

Thanks, Hans.

POSTED BY: Carl Adkins
Posted 4 years ago

Along the same lines, how do I get Mathematica to plot in X-Y fashion? I asked (in free-form) to plot a line from (2,3) to (-6,10), and all I got was a straight line without the X-Y framework

To get the XY axes in Graphics, set the option Axes to True (the default value is False)

Graphics[Line[{{2, 3}, {-6, 10}}], Axes -> True]
POSTED BY: Hans Milton
Posted 4 years ago

Thanks, Hans. I haven't tried this solution yet, but I will.

POSTED BY: Carl Adkins
Posted 4 years ago

Thanks, Hans. Seems like this is easy enough.

POSTED BY: Carl Adkins

What about this?

g = {-5, 1} + ({1, 3} - {-5, 1}) t;
p0 = g /. t -> 0
p1 = g /. t -> 1
p10 = g /. t -> 10
Norm[p1 - p0]
Norm[p10 - p0]
ParametricPlot[g, {t, -1, 11}, Epilog -> {PointSize[.02], Point /@ {p0, p1, p10}}]
POSTED BY: Hans Dolhaine
Posted 4 years ago

Thanks, Hans. I'll try your solution.

POSTED BY: Carl Adkins
Posted 4 years ago

For your first question you can give Mathematica enough information for it to be able to Solve for the coordinates of the end point that you want. Try this

Solve[{y==m*x+b,1==m*-5+b,3==m*1+b,(x-1)^2+(y-3)^2==10^2},{m,b,x,y}]

First you tell Mathematica you are dealing with a line. Then tell it about each of the two known points on that line. And finally use Pythagoras to tell it the square of the distance from your end point to the unknown point. If you run that it will give you two possible solutions. That is because it doesn't know if you want that unknown point on the line, but off to the left of (1,3) or or on the line, but off to the right of (1,3).

For your second question: you can display two graphic things on top of each other using Show. One of those can be a very simple Plot that will give you the X-Y framework that you want, but without any distracting details. The other can be the line that you want to display. Try this

Show[Plot[0,{x,-10,5},PlotRange->{-1,10}], Graphics[Line[{{2,3},{-6,10}}]]]

The Plot in that displays a horizontal line that is almost invisible because it is right on top of the x axis. The PlotRange is included to tell what range of the y axis to show, because otherwise there isn't enough information for Mathematica to guess what y range you want. Next the Graphics displays your line segment.

Look up in the help system the name of every one of those functions that I used and study the examples. See if you can try to figure out what I was thinking as I was writing this for you. Trying to understand that will hopefully help you see how to use similar thinking for you next problems.

POSTED BY: Bill Nelson
Posted 4 years ago

Thanks, Bill. I really like this solution.

POSTED BY: Carl Adkins
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract