Friday, 2 September 2016

Range of Quadratic Functions

Range of quadratic function $y=ax^2+bx+c$ can be easily calculated by transforming it by completing the square method.
$ax^2+bx+c=$\(a{\left( {x + \frac{b}{{2a}}} \right)^2} - \frac{\Delta }{{4a}}\)

We know that
\({\left( {x + \frac{b}{{2a}}} \right)^2} \ge 0\)         (where equality occurs when \(x =  - \frac{b}{{2a}}\))

When we multiply the left hand side of the equality, then two cases occur:
Case I:  $a>0$
\(a{\left( {x + \frac{b}{{2a}}} \right)^2} \ge 0\)
Case II: $a<0$
\(a{\left( {x + \frac{b}{{2a}}} \right)^2} \le 0\)   (The "greater than" equality becomes less than equality since we have multiplied the inequality with a negative number.)
Adding \({ - \frac{\Delta }{{4a}}}\) to both sides we get,

For the above case I: $a>0$


\(a{\left( {x + \frac{b}{{2a}}} \right)^2} { - \frac{\Delta }{{4a}}}\ge\)\({ - \frac{\Delta }{{4a}}}\)

or,  $y=ax^2+bx+c \ge $ \({ - \frac{\Delta }{{4a}}}\)

We can clearly conclude from here that the minimum value of the expression is \({ - \frac{\Delta }{{4a}}}\)  and it occurs when we put \(x =  - \frac{b}{{2a}}\) and there is no maximum value.

Therefore the range of the expression is \[\left[ { - \frac{\Delta }{{4a}},\infty } \right)\]

For the case II: $a<0$

\(a{\left( {x + \frac{b}{{2a}}} \right)^2} { - \frac{\Delta }{{4a}}}\le\)\({ - \frac{\Delta }{{4a}}}\)

or,  $y=ax^2+bx+c \le $ \({ - \frac{\Delta }{{4a}}}\)

We can clearly conclude from here that the maximum value of the expression is \({ - \frac{\Delta }{{4a}}}\)  and it occurs when we put \(x =  - \frac{b}{{2a}}\) and there is no minimum value.

Therefore the range of the expression is \[\left( { - \infty , - \frac{\Delta }{{4a}}} \right]\]

Example 1: $y=x^2+x+1$
$\Delta = b^2-4ac = 1^2-4.1.1 = -3$
\({ - \frac{\Delta }{{4a}}}={ - \frac{-3 }{{4.1}}}= \frac {3}{4}\)
Since $a=1>0$, Range is \(\left[ {\frac{3}{4},\infty } \right)\)

Example 2: $y=-x^2+x+1$
$\Delta = b^2-4ac = 1^2+4.1.1 = 5$
\({ - \frac{\Delta }{{4a}}}={ - \frac{5 }{{4.-1}}}= \frac {5}{4}\)
Since $a=1>0$, Range is \(\left( { - \infty ,\frac{5}{4}} \right]\).


Range of quadratic functions in composition with other functions:  

\[af(x)^2+bf(x)+c\]

If $f(x)$ has the range \(\left( { - \infty ,\infty } \right)\) then we can apply the same formulae derived above. In case the range of $f(x)$ is different from \(\left( { - \infty ,\infty } \right)\) we should not use the above formulae of range. 
Look at the following examples to get the concept of calculation of range of such functions:

Example 1: Calculate the range of  \(2{\sin ^2}x - \sin x + 1\).
Solution: First we convert the above expression to perfect square form using completing the square method: 
\[2{\sin ^2}x - \sin x + 1 = 2{\left( {\sin x - \frac{1}{4}} \right)^2} + \frac{7}{8}\]
Now we know that
\[ - 1 \le \sin x \le 1\]
Add to both sides $-\frac{1}{4}$
\[ - \frac{5}{4} \le \left( {\sin x - \frac{1}{4}} \right) \le \frac{3}{4}\]
Now,
\[0 \le {\left( {\sin x - \frac{1}{4}} \right)^2} \le \frac{{25}}{16}\]
[Be careful with squaring]
Multiply both sides with 2,
\[0 \le 2{\left( {\sin x - \frac{1}{4}} \right)^2} \le \frac{{25}}{8}\]
Add $\frac{7}{8}$ to both sides,
\[\frac{7}{8} \le 2{\left( {\sin x - \frac{1}{4}} \right)^2} + \frac{7}{8} \le \frac{{25}}{8} + \frac{7}{8}\]
or,
\[\frac{7}{8} \le 2{\sin ^2}x - \sin x + 1 \le \frac{{32}}{8}\]
Therefore the range of the expression is \(\left[ {\frac{7}{8},4} \right]\)

Example 2:  Calculate the range of \(3{\tan ^2}x - \tan x - 1\)
Solution: Since the range of \(\tan x\) is \(\left( { - \infty ,\infty } \right)\), therefore we can simply apply the formula to calculate range:
\(\Delta  = {b^2} - 4ac=1+12=13\)
\({ - \frac{\Delta }{{4a}}}={ - \frac{13 }{{4.3}}}= \frac {-13}{12}\)
Since $a=3>0$, Range is \(\left[ {\frac{-13}{12},\infty } \right)\)

Example 3: Calculate the range of \({x^2} - 3|x| - 2\)
Solution: \({x^2} - 3|x| - 2={|x|^2} - 3|x| - 2=\)\({\left( {\left| x \right| - \frac{3}{2}} \right)^2} - \frac{{17}}{4}\)
We know that,
\[|x| \ge 0\]
Adding $-\frac {3}{2}$ to both sides,
\[|x|-\frac {3}{2} \ge -\frac {3}{2}\]
\[{\left( {\left| x \right| - \frac{3}{2}} \right)^2} \ge 0 \]    [Again be careful with squaring]

Adding \( - \frac{{17}}{4}\) to both sides we get,
\[{\left( {\left| x \right| - \frac{3}{2}} \right)^2} - \frac{{17}}{4} \ge  - \frac{{17}}{4} \]
Therefore the range of the expression is \(\left[ { - \frac{{17}}{4},\infty } \right)\)














Sunday, 28 August 2016

Graphs of Quadratic expression.

We already the know how to change the form of the expression by completing the square method. We can use that form to draw graphs of quadratic expression with the help of transformation of graphs technique.

For Example:  \({x^2} + x + 1 = {\left( {x + \frac{1}{2}} \right)^2} + \frac{3}{4}\)
It's pretty easier to draw the graph of the R.H.S. using simple transformations. To give you an idea: first we draw the graph \(y={x^2}\) \( \to \) shift left this graph by \({\frac{1}{2}}\) unit  \( \to \) shift upwards the resultant graph by \({\frac{3}{4}}\) unit to get the final graph.

Let us begin with the simplest of quadratic expression:
 \[y = {x^2}\]

To draw the graph let us put certain interesting values of the independent variable 'x' into the expression and evaluate the dependent variable 'y', and thus obtain points in the form (x,y) to plot on the graph.
\(\begin{array}{*{20}{c}}x&y\\{ - 2}&4\\{ - 1}&1\\{ - 0.5}&{0.25}\\0&0\\{0.5}&{0.25}\\1&1\\2&4\end{array}\)
There fore we get the following points which we can plot on the graph:
\(( - 2,4),( - 1,1),( - 0.5,0.25),(0,0),(0.5,0.25),(1,1),(2,4)\)

The above graph is also called a parabola. Here (0,0) where the graph makes a U-turn or the minimum point of the parabola is called as the vertex of the parabola. The y-axis about which the parabola is symmetric (i.e. if we consider y-axis as a mirror, then the left side of the graph is the reflection of the right side) is called the axis of the parabola. Vertex can also be defined as the point where a parabola and its axis intersect.

Now let's draw the graph of   \[y = {(x-1)^2}\]
Find some interesting points to plot:
\(\begin{array}{*{20}{c}}x&y\\{ - 2}&9\\{ - 1}&4\\{ 0}&{1}\\{0.5}&{0.25}\\{1}&{0}\\2&1\\3&4\end{array}\)

Now we can again plot these points. We get,
We have also plotted the graph of \(y = {x^2}\) on the same graph as \(y = {(x-1)^2}\). As you may notice that the graph of the latter is nothing but the right shifted graph of the former function.
So if we would have plotted the graph of \(y = {(x-3)^2}\) then it's graph would be right shift of \(y = {x^2}\) graph by 3 units.

Now draw the graph of \(y = {(x+1)^2}\). I hope you have already got that its graph would be the left shift of the graph of \(y = {x^2}\) by 1 unit.




What happens when we draw the graph of \(y = {x^2} + 1\)? The difference between \(y = {x^2} + 1\) and \(y = {(x+1)^2} \) is that in the latter 1 gets added to x and then the square is taken, while in the former expression that x gets squared and then 1 is added.

So what should be the graph of \(y = {x^2} + 1\)? 1 gets added to each value of \({x^2} \) which results in a upward shift of the graph of \(y = {x^2} \) by unit and we get the graph of \(y = {x^2} + 1\). Draw by yourself and you should observe the same.



What is the vertex of \(y = {x^2} + 1\)?

Similarly we will see a downward shift of 1 unit in case of \(y = {x^2} - 1\).

Graph of \(y = a{x^2}\)
Where \( a\) is a real number not equal to zero.
Case I: \(0 < a < 1\)
You may verify the graph below by taking any example like \(y = 0.5{x^2}\)


Case II: \(a>1\)
You may verify the graph below by taking any example like \(y = 2{x^2}\)

Graph of \(y = -{x^2}\)

Multiplying $x^2$ by $-1$ results in reflection of the graph in $x-axis$

Now we can draw the graph of any quadratic expression.

Example 1: $2x^2-3x+1$
Solution: Let us transform the expression using completing the square method:
$2x^2-3x+1=$\(2\left[ {{{\left( {x - \frac{3}{4}} \right)}^2} + \frac{{17}}{6}} \right]\)

Step 1: Draw the graph of $y=x^2$
Step 2: Shift this graph right by $3/4$ to get the graph of \(y={{{\left( {x - \frac{3}{4}} \right)}^2}}\)
Step 3: Now draw the graph of \(y=2{{{\left( {x - \frac{3}{4}} \right)}^2}}\) by narrowing the graph as seen above.
Step 4: Finally draw the graph of \(y=2\left[ {{{\left( {x - \frac{3}{4}} \right)}^2} + \frac{{17}}{6}} \right]\) by shifting the last graph upwards by $\frac{17}{6}$ units.


A few observations that you can draw from the graph are:
1. The minimum value of the expression is $17/6$ and it occurs at $x=3/4$
2. The value of the expression for any \(x \in \mathbb{R}\) is always positive.









Example 2: $y=x^2-4x+1$
Transforming it using completing the square method:
$x^2-4x+1=(x-2)^2-3$

Step 1: Draw the graph of $y=x^2$
Step 2: Shift the graph in step 1 by 2 units to right to get the graph of $y=(x-2)^2$
Step 3: Now shift the graph in Step 2 by 3 units downwards to get the final graph of $y=(x-2)^2-3$


A few observations that you can draw from the graph are:
1. The graph cuts the $x-axis$ at two points which are the roots of the expression and whose values can be calculated using the formula or using completing the square method. We get \(\alpha  = 2 - \sqrt 3 \) and \(\beta  = 2 + \sqrt 3 \)
2. The minimum value of the expression is $-3$ and it occurs at $x=2$
3. The value of the expression is positive for \(x \in \left( { - \infty ,2 - \sqrt 3 } \right)\mathop  \cup \nolimits  \left( {2 + \sqrt 3 ,\infty } \right)\) 
4. The value of the expression is negative for \(x \in \left( {2 - \sqrt 3 ,2 + \sqrt 3 } \right)\)

Example 3: $y=-x^2+x+1$
Solution: \( - {x^2} + x + 1 =  - {\left( {x - \frac{1}{2}} \right)^2} + \frac{5}{4}\)

Step 1: Draw the graph of $y=x^2$
Step 2: Shift the graph right by $1/2$ units to get the graph of \(y = {\left( {x - \frac{1}{2}} \right)^2}\)
Step 3: Reflect the graph of Step 3 in $x-axis$ to get the graph of  \(y =  - {\left( {x - \frac{1}{2}} \right)^2}\).
Step 4: Shift the graph of Step 3 upwards by $5/4$ units to get the final graph of \( y=- {\left( {x - \frac{1}{2}} \right)^2} + \frac{5}{4}\)

A few observations that you can draw from the graph are:
1. The maximum value of the expression is $5/4$ which occurs at $x=1/2$
2. The graph cuts the x-axis at two points which are the roots of the expression given by \(\alpha  = \frac{1}{2} - \frac{{\sqrt 5 }}{2}\) and \(\beta  = \frac{1}{2} + \frac{{\sqrt 5 }}{2}\).
3. The value of the expression is positive for \(x \in \left( {\frac{1}{2} - \frac{{\sqrt 5 }}{2},\frac{1}{2} + \frac{{\sqrt 5 }}{2}} \right)\).
4. The value of the expression is negative for \(x \in \left( { - \infty ,\frac{1}{2} - \frac{{\sqrt 5 }}{2}} \right)\mathop  \cup \nolimits  \left( {\frac{1}{2} + \frac{{\sqrt 5 }}{2},\infty } \right)\)






There are these six important cases of the graph of $y=ax^2+bx+c$ in which we are interested.

The general quadratic expression $y=ax^2+bx+c$ can be transformed to
\(y = a\left[ {{{\left( {x + \frac{b}{{2a}}} \right)}^2} - \frac{\Delta }{{4{a^2}}}} \right] = a{\left( {x + \frac{b}{{2a}}} \right)^2} - \frac{\Delta }{{4a}}\)

Apply the same procedure as in the above examples and you will get the following cases:

[Note that the left and the right shift will depend on the signs of $a$ and $b$. If they have the same there will be a left shift because the value of $\frac {b}{2a} $ is positive and if they have opposite signs there will be a right shift. We have assumed the former case.]

Case I : $a>0$ and \(\Delta >0 \)
Case II : $a>0$ and \(\Delta =0 \)
 Case III : $a>0$ and \(\Delta <0 \)
 Case IV : $a<0$ and \(\Delta >0 \)
 Case V : $a<0$ and \(\Delta =0 \)
 Case VI : $a<0$ and \(\Delta <0 \)


In all the above cases the vertex is \[\left( { - \frac{b}{{2a}}, - \frac{\Delta }{{4a}}} \right)\]. The y-intercept is $(0,c)$.


Completing the square method for quadratic expressions.

 Let there be a quadratic expression given by \(y = a{x^2} + bx + c\) where \(a,b,c \in R\). We can transform this expression into a form where we may be able to draw certain conclusions about the behavior of the quadratic expression easily. Let us look at the form we are talking about. You may already be acquainted with completing the square method of finding the roots of the quadratic equation.
Take 'a' common from the expression:
\(a{x^2} + bx + c\)
\( = a\left( {{x^2} + \frac{b}{a}x + \frac{c}{a}} \right)\)
Now multiply and divide the second term of the expression by 2:
\( = a\left( {{x^2} + 2 \cdot \left( {\frac{b}{{2a}}} \right)x +  \frac{c}{a}} \right)\)
Now add and subtract   \({\frac{{{b^2}}}{{4{a^2}}}}\) . The purpose of which is to get a perfect square of the form \({\left( {x + y} \right)^2} = {x^2} + 2xy + {y^2}\).
We get,
\(a{x^2} + bx + c\)\( = \)\(a\left( {{x^2} + 2 \cdot \left( {\frac{b}{{2a}}} \right)x + \frac{{{b^2}}}{{4{a^2}}} - \frac{{{b^2}}}{{4{a^2}}} +  \frac{c}{a}} \right)\)
Completing the square we get
\( = \)\(a\left[ {{{\left( {x + \frac{b}{{2a}}} \right)}^2} - \frac{{{b^2}}}{{4{a^2}}} +  \frac{c}{a}} \right]\)
\( = \)\(a\left[ {{{\left( {x + \frac{b}{{2a}}} \right)}^2} - \frac{{{b^2} - 4ac}}{{4{a^2}}}} \right]\)
\( = \)\(a\left[ {{{\left( {x + \frac{b}{{2a}}} \right)}^2} - \frac{\Delta }{{4{a^2}}}} \right]\)
where \(\Delta  = {b^2} - 4ac\) is called the discriminant of the quadratic expression.
This form of the expression now has a perfect square (the squared term) plus a constant. This form we will use to calculate range, roots, extremum and graph of the expression.

You should solve these examples to get a clear idea of the above process.
Example 1:
\({x^2} + x + 1\)
Solution:
\( = \)\({x^2} + x + 1\)
\( = \)\({x^2} + 2 \cdot \left( {\frac{1}{2}} \right)x + 1\)
\( = \)\({x^2} + 2 \cdot \left( {\frac{1}{2}} \right)x + \frac{1}{4} - \frac{1}{4} + 1\)
\( = \)\({\left( {x + \frac{1}{2}} \right)^2} + \frac{3}{4}\)

Example 2:
\(2{x^2} - 5x + 4\)
Solution:
\( = \)\(2\left( {{x^2} - \frac{5}{2}x + 2} \right)\)
\( = \)\(2\left( {{x^2} - 2 \cdot \left( {\frac{5}{4}} \right)x + 2} \right)\)
\( = \)\\(2\left( {{x^2} - 2 \cdot \left( {\frac{5}{4}} \right)x + \frac{{25}}{{16}} - \frac{{25}}{{16}} + 2} \right)\)
\( = \)\(2\left[ {{{\left( {x - \frac{5}{4}} \right)}^2} + \frac{7}{{16}}} \right]\)

Example 3:
\( - 5{x^2} + 9x - 6\)
Solution:
\(\begin{array}{l} =  - 5\left( {{x^2} - \frac{9}{5}x + \frac{6}{5}} \right)\\ =  - 5\left( {{x^2} - 2.\left( {\frac{9}{{10}}} \right)x + \frac{6}{5}} \right)\\ =  - 5\left( {{x^2} - 2.\left( {\frac{9}{{10}}} \right)x + \frac{{81}}{{100}} - \frac{{81}}{{100}} + \frac{6}{5}} \right)\\ =  - 5\left[ {{{\left( {x - \frac{9}{{10}}} \right)}^2} + \frac{{39}}{{100}}} \right]\end{array}\)