Finding the greatest value of a function

In summary, the conversation discusses finding the range and maximum/minimum values of the rational function (x^2-2x+4)/(x^2+2x+4). The typical method involves assuming the function to be y, forming a quadratic, and applying D>0. However, the poster has discovered a shortcut using basic calculus to find the critical points. The discussion also touches on the issue of the function being undefined at certain points and the importance of finding the range of the function as a whole.
  • #1
shivam01anand
37
0

Homework Statement



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)


Homework Equations




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

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.
 
Physics news on Phys.org
  • #2
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.
 
  • #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?
 
  • #4
There is no "is not defined" in HallsofIvy's post.

shivam01anand said:
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?
That can be an issue, indeed, but it is not for this specific problem. The issue is here:
shivam01anand said:
then forming the quadratic and then finally applying D>0 .
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.
 
  • #5
mfb said:
This is a valid method for quadratic functions, but your function is not quadratic.
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.
 
  • #6
shivam01anand said:

Homework Statement



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)

Homework Equations



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

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.
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.
 
  • #7
SammyS said:
Your "shortcut" will only find where the numerator or where the denominator has a maximum (or minimum).
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.
 
  • #8
haruspex said:
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.

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:
  • #9
SammyS said:
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.
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.
 
  • #10
SammyS said:
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.


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.

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!
 
  • #11
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.
 
  • #12
shivam01anand said:
=y then D>0 is the way to go!

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
 
  • #13
Ehild what you just showed is the general and correct way to find it, right?
 
  • #14
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
 
  • #15
Wait I am 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?
 
  • #16
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.
 
  • #17
shivam01anand said:
Wait I am 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?

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]
 
  • #18
shivam01anand said:
Wait I am 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?

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
 

Attachments

  • Graph1.jpg
    Graph1.jpg
    8.3 KB · Views: 472
Last edited:
  • #19
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.
 
  • #20
Thank you mfb. I edited my post. I can not imagine how the program made that graph from the function.

ehild
 

Related to Finding the greatest value of a function

1. What is the definition of a function?

A function is a mathematical relationship between an input (x) and an output (y) where each input has only one corresponding output.

2. How do you find the greatest value of a function?

To find the greatest value of a function, you can take the derivative of the function and set it equal to 0. Then, solve for x to find the critical points. Plug these critical points into the original function and the largest value will be the greatest value of the function.

3. Can a function have more than one greatest value?

No, a function can only have one greatest value. This is because a function can only have one output for each input, so there can only be one highest output.

4. What is the difference between a local maximum and a global maximum?

A local maximum is the largest value of a function within a specific interval. A global maximum is the largest value of a function over the entire domain. A global maximum can also be referred to as the absolute maximum.

5. How is finding the greatest value of a function useful?

Finding the greatest value of a function is useful in many real-world applications, such as finding the maximum profit or revenue for a business. It is also helpful in optimization problems, where the goal is to find the maximum or minimum value of a function.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
15
Views
828
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
778
  • Precalculus Mathematics Homework Help
Replies
11
Views
727
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
17
Views
3K
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
955
  • Precalculus Mathematics Homework Help
Replies
13
Views
2K
Back
Top