1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding the greatest value of a function

  1. Dec 23, 2013 #1
    1. The problem statement, all variables and given/known data

    So you know the quadratic equations questions like say find the range/ max and min value of the function (x^2-2x+4)/(x^2+2x+4)


    2. Relevant equations


    (x^2-2x+4)/(x^2+2x+4)

    3. The attempt at a solution


    So the typical method for this question is assuming this function to be some y, then forming the quadratic and then finally applying D>0 .

    However now after a year, at a position where i know basic calculus i can diffn this function to find the critical pts.

    MY QUESTION TO YOU is this.


    Will the answer from this shortcut, per say , be always correct and in accordance with the long typical method.

    Thank you.
     
  2. jcsd
  3. Dec 23, 2013 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    You keep using word "quadratic". Do you intend "(x^2-2x+4)/(x^2+2x+ 4)" to represent two separate problems? If so, x^2- 2x+ 4= x^2- 2x+ 1+ 3= (x- 1)^2+ 3, has a minimum value, 3, at x= 1, and x^2+2x+4= x^2+ 2x+ 1+ 3= (x+1s)^2+ 3, has a minimum value, 3, at x= -1. And, yes, if you differentiate those and set the derivative equal to 0, you will get 2x- 2= 0 so x= 1, and 2x+ 2= 0 so x= -1.

    In general, if f(x)= ax^2+ bx+ c, then, completing the square, f(x)= a(x^2+ (b/a)dx+ b^2/4a^2)+ (c- b^2/4a)= a(x+ b/2a)^2+ (c- b^2/4a) has minimum value, c- b^2/4a, at x= -b/2a. While f'(x)= 2ax+ b= 0 when x= -b/2a.

    But if you mean the rational function, [itex]\frac{x^2- 2x+ 4}{x^2+ 2x+ 4}[/itex], that's a different matter. Since that is not a quadratic, what you are referring to as the "shortcut", by which I presume you mean "completing the square", does not apply.
     
  4. Dec 23, 2013 #3
    yes i am extremely sorry for not properly naming the respective equations nicely enough.

    I meant the rational function.

    Why do you say it is not defined?

    Are you referring to those problems in which the denominator is equal to zero and hence the fn does indeed get to infinity which we won't get by calculating the max/min approach?

    Or is there a big mistake on my part of applying that?
     
  5. Dec 23, 2013 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    There is no "is not defined" in HallsofIvy's post.

    That can be an issue, indeed, but it is not for this specific problem. The issue is here:
    This is a valid method for quadratic functions, but your function is not quadratic.

    What do you mean with "shortcut"? Differentiation will always work if the function is differentiable everywhere and if it has a maximum.
     
  6. Dec 23, 2013 #5

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I think the idea was to write the equation as y(x^2+2x+4) = (x^2-2x+4) and rearrange that as a standard quadratic in x. Applying D > 0 then gives information about y.
     
  7. Dec 23, 2013 #6

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Analyzing and sketching the graph of a rational function such as ## \displaystyle \frac{x^2- 2x+ 4}{x^2+ 2x+ 4} ##, is a fairly typical exercise for a pre-calculus class.

    You generally need to determine the domain of the function.

    Find any intercepts, for x and/or y.

    Find and determine any asymptotes, vertical and horizontal/slant .



    Setting the numerator to zero and solving for x, will get you started on finding any x-intercepts.

    Setting the denominator to zero and solving for x, will get you started on finding any vertical asymptotes.

    Your "shortcut" will only find where the numerator or where the denominator has a maximum (or minimum). That can work in this case because each of the numerator and the denominator has no zero -- and your "shortcut" can help determine that by finding that the minimum of each is positive, so that neither has a zero.

    However, to find the range of this rational function, you need to find the minimum and maximum of the function as a whole. The min & max occur at values of x different than either minimum of the numerator or denominator.
     
  8. Dec 23, 2013 #7

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I think you (and mfb, and Halls) have not understood the shortcut suggested. See post #5. It quickly yields the range [1/3, 3], the extremals corresponding to |x|=2. The local extreme values of numerator and denominator are at |x|=1.
     
  9. Dec 23, 2013 #8

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Interesting !

    You're right concerning my (lack of) understanding of the non-shortcut (long way).

    The shortcut being to differentiate the rational function, then set that equal to zero, etc. to find the extrema, thus the range.
     
    Last edited: Dec 23, 2013
  10. Dec 24, 2013 #9

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Ah yes, and you're right that the OP refers to the calculus way as the shortcut. Seems to me the calculus route is the longer, so I read it as the other way around.
     
  11. Dec 24, 2013 #10
    Hmm that makes it rather clear, the thing about local vs global max/min etc

    Turns out the differentiating method is a risky one with more and more chances of mistake plus the fact that it's not a shorter method in the first place..

    Thank you all for the valuable input.

    =y then D>0 is the way to go!
     
  12. Dec 24, 2013 #11

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    The calculus route is quick if you simplify the expression first:

    $$\frac{x^2- 2x+ 4}{x^2+ 2x+ 4} = 1-\frac{4x}{x^2+ 2x+ 4}$$
    The constant 1 drops out in the derivatives.
     
  13. Dec 26, 2013 #12

    ehild

    User Avatar
    Homework Helper
    Gold Member

    It works in this case.

    [tex]\frac{x^2-2x+4}{x^2+2x+4}=y \rightarrow x^2(y-1)+2x(y+1)+4(y-1)=0[/tex]

    The discriminant is [tex]D=4(y+1)^2-16(y-1)(y-1)[/tex]
    x has to be real, so D≥0--->[y+1+2(y-1)][(y+1)-2(y-1)]≥0

    That means 3y-1 ≥0 and 3-y≥0, the range is 1/3≤y≤3.

    ehild
     
  14. Dec 26, 2013 #13
    Ehild what you just showed is the general and correct way to find it, right?
     
  15. Dec 26, 2013 #14

    ehild

    User Avatar
    Homework Helper
    Gold Member

    No, the general way to find the range of a function is the one with differentiation. Find the local extrema, where the first derivative is zero, and also check the boundaries of the domain.

    What is the range of f(x)=x4-4x3+x2-6x+1, for example?
    Can you figure it out?

    If you have a fraction of two second order polynomials, your method might work.

    ehild
     
  16. Dec 28, 2013 #15
    Wait im just talking about the f(x)/q(x) type of functions.. here the differentiation will not always give correct solution.

    For example say;



    x^2-5x+6/ x^2-2x-3



    Via differentiation you'll get two pts and hence maxima/minima from these two points.


    But obviously the maxima is ∞ at x= 3/-1

    So that's my theory behind it not being the method to follow FOR this type of q.

    IS my reasoning flawed in any way?
     
  17. Dec 28, 2013 #16

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Don't forget brackets.

    That function does not have a maximum, and setting the derivative to zero does not give a solution - exactly what you want.
     
  18. Dec 28, 2013 #17

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Judicious use of differentiation will always yield correct solutions, and is the most common and straightforward way to deal with such problems.

    If the function f(x) = p(x)/q(x) has points where q = 0 but with p ≠ 0 at those points, then the graph of f will have vertical asymptotes, and so will not have finite optima of both types (but could, for example, have a finite minimum but no maximum, or vice versa). If f(x) fails to have both a finite max and finite min you are done; however, if it has a finite max (or min), you can find it out via differentiation. Be warned, however, that such problems are theoretical difficult, and in the worst case can involve checking many local optima to find the best of them, essentially by brute-force calculations.

    Avoiding derivatives, as you seem to want to do, will generally produce problems that are even harder. If you don't believe it, try both methods on the following example:
    [tex] f(x) = \frac{x^4 - 3 x^3 + 5 x^2 - 2 x + 6}{x^4 +2 x^3 + 4 x^2 + x + 5} [/tex]
     
  19. Dec 28, 2013 #18

    ehild

    User Avatar
    Homework Helper
    Gold Member

    The function (x^2-5x+6)/( x^2-2x-3) does not have local extrema ( the derivative is nowhere zero).
    Edit:
    x=3 and x=-1 are not points of the domain. It is not true that the maxima are at 3/-1. The function is not defined at those points. It is a hole in the domain at x=3, and a vertical asymptote at x=-1. The function goes to infinity if x tends to -1 from left, and tends to - infinity, if x goes to -1 from the right.
    With derivation, you will find that the function monotonously increases in its whole domain.

    ehild
     

    Attached Files:

    Last edited: Dec 29, 2013
  20. Dec 29, 2013 #19

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    ehild: your graph looks wrong, the factor (x-3) is in both the numerator and the denominator, x=3 is just a hole in the function at that point - the only vertical asymptote is at x=-1.
     
  21. Dec 29, 2013 #20

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Thank you mfb. I edited my post. I can not imagine how the program made that graph from the function.

    ehild
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Finding the greatest value of a function
Loading...