# Ratio of two lines.

• Jun 22nd 2010, 06:55 PM
beezee99
Ratio of two lines.
Hi All

Consider two straight lines represented by y1=1-x1 and y2=1-x2. I want to calculate the ratio of these two lines i.e. y1/y2. The range of x1 and x2 is the same (say 0.5 to 1). So is the ratio of these two lines going to be a straight line or a curve with some other characteristics? How to analyse this ratio in detail for its characteristics (I mean minima and maxima etc.)?

Thanks.
• Jun 23rd 2010, 01:52 AM
Ackbeet
Computing the ratio is essentially a one-step process. That ratio is definitely not going to be a straight line. It will be a curve with various characteristics. Am I right in thinking that you now have a curve that is a function of two independent variables, $\displaystyle x_{1}$ and $\displaystyle x_{2}$? And you're trying to find the extrema of your new function over the rectangle $\displaystyle [0.5,1]\times[0.5,1]$, correct?
• Jun 23rd 2010, 04:06 PM
beezee99
Dear Ackbeet.
Thank you for ur response. "That ratio is definitely not going to be a straight line." I wrote a pseudo-code for it and found that the statement that u r giving is correct. The code calculates 0.5<x2<1.0 and the ratio 'f' for every 0.5<x1<1.0. Below are the curves that I get. Left one is "x1 vs x2" and the right one is "x1 vs the ratio".
Attachment 17978
However,the ratio can be written as
Attachment 17977
It can be viewed as a straight line equation. But the thing is the intercept (1/1-x2) and slope (-1/(1-x2)) are variables as 0.5<x2<1. So this seems a bit strange. Moreover the graph between x2 and f shows that the ratio varies from a straight line to a curve at the top. So how to analyze this ratio analytically for maximum and minimum ?
Thanks.
• Jun 24th 2010, 04:55 AM
Ackbeet
I don't think you're going to find that approach very productive. To analyze the function, take the partial derivatives with respect to $\displaystyle x_{1}$ and $\displaystyle x_{2}$, and set them both equal to zero. See where that leads you.
• Jun 24th 2010, 06:14 PM
beezee99
Dear Ackbeet
Thanks for ur answer. From the second equation, x1=1, but I am not getting any valuable information about x2 from the partial derivatives as well.
Attachment 17989
Any ideas?
Thanks.

PS: Sorry there is not - in second equation.
• Jun 24th 2010, 06:23 PM
Ackbeet
I got the negative of your derivative with respect to $\displaystyle x_{2}$, but that doesn't really matter, since we're setting it equal to zero. The fact that the $\displaystyle \partial f/\partial x_{1}$ equation doesn't tell you anything is fine. It just means that test is inconclusive. So, we know that $\displaystyle x_{1}=1$ for critical points. I think you can also see that the function will blow up if $\displaystyle x_{2}=1$. Are you sure you're trying to find the extrema of this function over the region $\displaystyle [0.5,1]\times[0.5,1]$? The function isn't continuous on that region.
• Jun 24th 2010, 07:30 PM
beezee99
Thank you Ackbeet.

Actually the bounds on x1 and x2 are [0.45,0.99]. But it does not matter, does it? I am aware of the the discontinuity as u mentioned, but I am not gettin anywhere with it.

Thanks.
• Jun 25th 2010, 02:15 AM
Ackbeet
Well, if the bounds are as you say, then the functions in question are all nice and differentiable everywhere in the region. Moreover, there are no critical points inside that region. Therefore, you must examine the function on all four boundaries. How do you do that? Well, let's take the $\displaystyle x_{1}=0.45$ boundary. Plug that into the ratio. See where the remaining function (which is now only a function of $\displaystyle x_{2}$) has extrema. Do the same for the other three sides of your square region. The smallest value you find is going to be the minimum, and the largest one you find is going to be the maximum. Because you now have a continuous function on a closed region, you're guaranteed to find a min and a max. Do you see how to proceed?