Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Quadratic equation

  1. Sep 23, 2006 #1
    Now I am trying to graph this thing.

    Lets say I have x^2+x+10=0

    So yah... I plot them for -10<x<10 and get the y values....

    What I would like to know is how do I change the scale as to get zoom in and zoom out effect?
  2. jcsd
  3. Sep 23, 2006 #2
    I'm assuming you mean on a calculator?

    If you are using a ti calculator, then you can go to window>zoom. You can use the various types of zoom, such as zoombox, zoomin, etc...

    but take note that these zooms change the x range, and y range.
  4. Sep 23, 2006 #3

    no... what is the math behind the zoom? I am writing a program. Do I just divide the whole thing to zoom in and multiply to zoom out?
  5. Sep 24, 2006 #4
    What do you mean what is the math behind the zoom....

    Maybe I'm making this harder than it is, so I'll just put my thoughts out.

    Lets say you are graphing y=x.

    You first setup your coordinates.
    Lets say:
    x= -10..10
    y= -10..10

    Now setup a scale,
    x_scl = 1
    y_scl = 1

    Now have the program draw the axis.
    Now have the program plot within this window. You are using discrete values here, so you have a restricted domain. You will feed the function values from -10 to 10, such as r_n1 = -10, -9.9, -9.8, ... this will depend on the resolution of your drawing window. Each of these f(r_n) values gives you a point (r_n, f(r_n)) that will correspond to a pixel on the screen.

    So now if you zoom in on the orgin for example, your domain would be x=-5..5 for example, and might have the discrete values, r_n2=-5,-4.95,-4.9,...
    If we count r_n1 and r_n2 we notice they have the same number of elements. It's just that r_n2 is feeding the function a different set of values, and in return you are getting a different set of points to plot (the zoomed points).

    I see what you are saying now with the, "do I multiply, divide, ..." Honestly I don't know if that would work, I would have to play around with it. So I'm assuming you are using a plotting routine of the language then, and not creating a generic plotting function. If you don't need to create a plotting function, why don't you just use software out there to do your task.
    A quick google search has this, http://www.mathworks.com/access/helpdesk/help/toolbox/dotnetbuilder/ug/index.html?/access/helpdesk/help/toolbox/dotnetbuilder/ug/bqhr8rn-1.html [Broken]

    or you could use the free Maxima,

    to do your plotting.
    Last edited by a moderator: May 2, 2017
  6. Sep 24, 2006 #5


    User Avatar
    Homework Helper

    You can't plot x^2+x+10=0, because it represents an equation, which, by the way, has no solution. If you had an equation of this form which had a solution, the only thing you could plot would be the solution, which is represented by one or two points.
  7. Sep 24, 2006 #6
    I'd imagine he wants to plot f(x)=x^2+x+10, and then see graphically that there are no real solutions to f(x)=0. Could be wrong though... all my assumptions in this thread seem to have failed thus far:)
  8. Sep 24, 2006 #7


    User Avatar
    Homework Helper

    You're right, of course he could plot f(x)=x^2+x+10 and g(x)=0 separately and see that f(x)=g(x) has no real solutions.
  9. Sep 24, 2006 #8
    Uhg... I don't know how to explain this....

    I have a function f(x)=aX^2+bX+c
    I want to plot point (x,f(x))--i know how to do that
    I want to be able to zoom in/out the graph--need help here

    here is an example


    click the start button under "interactive tutorial" and check out the zoom in and zoom out buttons.
    Last edited: Sep 24, 2006
  10. Sep 24, 2006 #9


    User Avatar
    Homework Helper

    Zooming in and zooming out would mean changing the interval in the domain of the function which is to be plotted in the sense of making it smaller to zoom in, or greater to zoom out.
  11. Sep 24, 2006 #10
    can you explain in more detail please?
  12. Sep 24, 2006 #11


    User Avatar
    Homework Helper

    Say you're plotting your function f on an interval I = [a, b], where the 'plot' means the graph, i.e. the set S = {x, f(x) : x is in [a, b]}. Now, zooming in would mean taking a proper subset of I, let's say I', and plotting the graph for I'.
  13. Sep 24, 2006 #12
    how are you doing this?
  14. Sep 24, 2006 #13


    User Avatar
    Science Advisor
    Homework Helper

    If you know how to plot points, then zooming is a simple matter of restricting the domain and choosing a new range. If your original interval was [a, b] then you could zoom to


    where Z is the zoom factor. To zoom in 2x, set Z = 2; to zoom in 100x, set Z = 100. Zoom out by using the reciprocal of the zoom factor (Z= 1/2 or Z = 1/100, in these examples).

    You can change the range in the same way, or have it fit the equation by calculating the max and min of the function over the interval and setting the top and bottom on that basis.
  15. Sep 24, 2006 #14
    well I just go over a loop and plot points...

  16. Sep 24, 2006 #15
    What does,


  17. Sep 24, 2006 #16
    nothing... it just makes more points
    Last edited: Sep 24, 2006
  18. Sep 24, 2006 #17
    it plots one point?

    I see you edited your post.

    Yes it makes more points... do you see how that is actually a zoomed in portion?
    Last edited: Sep 24, 2006
  19. Sep 24, 2006 #18
    sorry didn't read what you said...

    from 1 to 2 it will make points (x=1,y),(x=1.5,y),(x=2,y).... don't see how it would zoom in or out.
  20. Sep 24, 2006 #19
    Is this a project for school?
  21. Sep 24, 2006 #20


    User Avatar
    Science Advisor
    Homework Helper

    Did you see my post #13? I think I answered your question.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook