Jump to content

Recommended Posts

Posted (edited)

For this challenge, I've decided to go with the parabola yet again. If we take a triangle, it is possible to find three parabolic curves that fit perfectly inside the triangle such that two vertices of the triangle are located on a parabola with two sides of the triangle being tangent to the parabola at those points. The following image illustrates this property:

 

post-51329-0-36917100-1384851489_thumb.png

 

The above image demonstrates these parabolic curves that fit perfectly in the triangle. Of course, the equation that describes the parabolas is not a standard function and is defined parametrically. Furthermore, the order of the points matter, which determines the parabolic curve and direction along the path. The goal of this challenge is to find the parametric equation that describes the parabolic curves that fit inside a triangle specified by the vertices [math]P_0=(x_0, y_0)[/math], [math]P_1=(x_1, y_1)[/math], and [math]P_2=(x_2, y_2)[/math].

Edited by Daedalus
Posted (edited)

I appreciate the rep points, but is anyone interested in trying to solve the challenge? I do realize that it may seem complicated, but the answer can be derived using a few concepts from Calculus 1 and algebra.

Edited by Daedalus
Posted

This seems like one I should be able to solve but I'm unsure if the antiderivative will give me the right function to parametrize.

 

Posted (edited)

This seems like one I should be able to solve but I'm unsure if the antiderivative will give me the right function to parametrize.

I think you are heading in the wrong direction. Look further into what is going on in the problem. We clearly have two sides of the triangle that are tangent to the parabolic curve. To give you a hint, I had to use a limit. However, I didn't use the derivative directly. Instead, I used the tangents with a method I developed to solve this problem : ) I've never heard of anyone using this method before, but that doesn't mean it is new. Regardless, It's actually a pretty cool way to derive the parametric equation.

Edited by Daedalus
Posted

Well, I'm stumped.I was hoping to use the slope of the tangent ( m ) with y = mx + Constant to get the derivative of the parabola at (x,y). Right now I'm trying to get Python to plot it in matplotlib
but mostly just reading the documentation for matplotlib.

I'm looking forward to seeing your solution.

Posted (edited)

Well, I'm stumped.I was hoping to use the slope of the tangent ( m ) with y = mx + Constant to get the derivative of the parabola at (x,y). Right now I'm trying to get Python to plot it in matplotlib

but mostly just reading the documentation for matplotlib.

I'm looking forward to seeing your solution.

 

Now you are getting on the right track, and you already have two lines that are tangent to the parabolic curve. You should explore that method and see what you discover. happy.png Here, this should help you along:

 

Point-Slope Linear Form

 

[math]y-y_1=m(x-x_1)[/math]

 

or

 

[math]y=m(x-x_1)+y_1[/math]

Edited by Daedalus
Posted (edited)

Can we assume that P0=-P2?

 

It has to work for any triangle, but it can help to work with a simple triangle to solve the problem. To give you all another hint, I solved the problem much like one would do for approximating an integral or for arc length. Hence, the use of the limit.

Edited by Daedalus
Posted

Had some time this morning to get a clue about matplotlib.
Once we know the derivative, can't we find the antiderivative at a point on the parabola to get the equation? I'm unsure about integrals.

post-10029-0-27112700-1385240058.png

Posted

Had some time this morning to get a clue about matplotlib.

Once we know the derivative, can't we find the antiderivative at a point on the parabola to get the equation? I'm unsure about integrals.

 

I didn't use the derivative directly. Think about the other properties that tangent lines have besides being tangent to the curve. In other words, how can we use tangent lines to derive the parametric equation without using the derivative directly.

Posted (edited)

Do we get a prize?

 

I will give you rep and 5 stars 1 additional star if you can solve the problem, and you might get rep and stars from other people too. However, the biggest prize is the knowledge and satisfaction that you gain from working the problem and finding the solution, which is why I post these challenges. Of course, it also allows me to share problems that I have solved in a fun way instead of just posting a bunch of equations.

 

Edit: Perhaps five stars is a little too much for solving one problem. I'll give you an extra star for each challenge that you win. By the time you have completed five challenges, you will have a vote of five stars and five points of rep from me. I realize it isn't much of a prize, but it's the best I can do. If I could offer more rep for solving certain challenges, I would. At least you will have gained some knowledge and bragging rights for being the first person to solve each challenge. cool.png

Edited by Daedalus
Posted

 

//I can get pretty close with linear approximation, but I don't know how to say it in Math.
#include "stdio.h"

//f(x) = f(a) + f'(a)(x - a)

int main(int argc, char *argv[])
{
float X = -2; //startpoint a=(-2,0)
float slope = -2; //f'(a)
float Y =0; //f(a)
float dx=0.01; //interval

printf("%f\n",Y);
for(X=-2;X<=2;X+=dx){
Y = Y + slope*X*dx;
printf("%f\n",Y);
}
return 0;
}

 

 

Thanks for another enlightening challenge!

Posted (edited)

Thanks for another enlightening challenge!

 

You're welcome. At risk of giving the solution away, I'm going to give you one last hint. You have 2 vertices of the triangle that are also points on the parabola. You also have two sides of the triangle that are tangent to the parabola at those 2 vertices. Now, you have the third vertex of the triangle that has nothing to do with the parabolic curve. The only thing this third point has in common with the parabola is that it is also where both tangent lines intersect. I have now given you most of the information needed to solve the challenge. If you read the thread carefully, you should be able to use this hint to figure out how to find the solution.

 

If no one replies to the thread asking for more time by tomorrow, I will go ahead and post the solution. happy.png

Edited by Daedalus
Posted

Odd as it may seem I was trying to solve a similar problem at work a while ago.

I was trying to predict the melting points of mixtures of 2 materials, given very little starting data.

What I had was the melting points of the 2 materials and their cryoscopic constants.

Here is the world's worst diagram

Anyway, I had the gradients at the two extremes of the range and I had the values at those ends too.

I ended up fitting a cubic equation to the data because a quadratic wouldn't fit.

I was then able to estimate the melting points of the mixtures in between.

the point is that I couldn't get a quadratic to work- there was "too much" data.

 

So, I suspect that the answer to the question is no.

 

I can draw a parabola through a point with a given gradient at that point and which passes through a second point, but I have run out of variables to decide what the gradient will be at that second point.

I think you would need to use cubics, rather than parabolae.

post-2869-0-32299500-1385572754_thumb.jpg

Posted (edited)

Can we have more time?

 

You sure can. I'll give you till Dec 2, 2013.

 

Odd as it may seem I was trying to solve a similar problem at work a while ago.

I was trying to predict the melting points of mixtures of 2 materials, given very little starting data.

What I had was the melting points of the 2 materials and their cryoscopic constants.

Here is the world's worst diagram

Anyway, I had the gradients at the two extremes of the range and I had the values at those ends too.

I ended up fitting a cubic equation to the data because a quadratic wouldn't fit.

I was then able to estimate the melting points of the mixtures in between.

the point is that I couldn't get a quadratic to work- there was "too much" data.

 

So, I suspect that the answer to the question is no.

 

I can draw a parabola through a point with a given gradient at that point and which passes through a second point, but I have run out of variables to decide what the gradient will be at that second point.

I think you would need to use cubics, rather than parabolae.

 

This particular problem actually results in a parabola. There is a very interesting property that tangent lines to parabolas have that make it possible to solve this one.

Edited by Daedalus
Posted

Is it -| x * 31/2 * | x |1/2 * ( 1 / x2)1/2 | / 2 + 1.251/2/2, where |x| represents the absolute value, and assuming x0 = - x2?

 

No, the actual solution is in parametric form where you have an equation for [math]x[/math] and one for [math]y[/math]. An example would be:

 

[math]F_x(t)=t[/math]

[math]F_y(t)=t^2[/math]

 

Remember, the equation uses all three vertices of the triangle to define the parabolic curves, and the order of the points determine the curve (there are three) and direction along the path.

Posted (edited)

After speaking with Endercreeper01, he's decided to go ahead and let me post the solution lol... happy.png

 

 

 

Deriving the Solution

In order to solve this challenge, we'll need to partition two sides of the triangle into [math]n[/math] segments. We also have to account for direction. So, if we consider that an object moves along the curve from the point [math]P_0[/math] towards [math]P_1[/math] ending at [math]P_2[/math], then the first side, U, starts at [math](x_0,y_0)[/math] and ends at [math](x_1,y_1)[/math] and the other side, V, at [math](x_1,y_1)[/math] to [math](x_2,y_2)[/math]. This allows us to define the following parametric equations that describe the points along the specified sides of the triangle in terms of our parameter [math]t[/math] where [math]\{t \in \mathbb{N} : 0\le t\le n\}[/math].

[math]\text{U}_x(t)=x_0+(x_1-x_0)\,\frac{t}{n}[/math]

[math]\text{U}_y(t)=y_0+(y_1-y_0)\,\frac{t}{n}[/math]

[math]\text{V}_x(t)=x_1+(x_2-x_1)\,\frac{t}{n}[/math]

[math]\text{V}_y(t)=y_1+(y_2-y_1)\,\frac{t}{n}[/math]

Now that we have the equations for the points along both sides of the triangle, we will use them to create an equation that describe the lines tangent to the parabola.

[math]\text{L}(t,x)=\frac{\text{V}_y(t)-\text{U}_y(t)}{\text{V}_x(t)-\text{U}_x(t)}\left(x-\text{U}_x(t)\right)+\text{U}_y(t)[/math]

The following image illustrates these lines tracing out a parabolic curve.

post-51329-0-79273100-1385704055.png

We can see that the parabolic curve is approximated by the points at the intersection of two consecutive lines. As the number of partitions approach infinity, the points of intersection converge to the points on the parabolic curve. By solving [math]\text{L}(t)=\text{L}(t+1)[/math], we can derive the [math]x[/math] and [math]y[/math] equations that define the points of intersection. Working the math we get:

[math]x(t,n)=\frac{n^2\,x_0-n(2t+1)(x_0-x_1)+t(t+1)(x_0-2 x_1+x_2)}{n^2}[/math]

[math]y(t,n)=\frac{n^2\,y_0-n(2t+1)(y_0-y_1)+t(t+1)(y_0-2 y_1+y_2)}{n^2}[/math]

Now that we have the parametric equation that defines the points of intersection, we can take the limit of this equation as the number of partitions [math]n[/math] approach infinity and arrive at the parametric equation that describes the parabolic curve. However, before we can do this, we'll need to redfine the parameter [math]t[/math] such that it approaches [math]n[/math] on the interval [0,1]. By redefining the parameter as [math]n\times t[/math], when [math]t=0[/math] we get back [math]0[/math] and when [math]t=1[/math] we get back [math]n[/math]. This allows us to parametetize the function using [math]n\times t[/math] where [math]\{t \in \mathbb{R} : 0\le t\le 1\}[/math] while covering the entire domain previously defined for [math]t[/math]: [math]\{t \in \mathbb{N} : 0\le t\le n\}[/math].

[math]\lim_{n \to \infty}x(n\,t,n)=x_0-2\,x_0\,t+x_0\,t^2+2\,x_1\,t-2\,x_1\,t^2+x_2\,t^2[/math]

[math]\lim_{n \to \infty}y(n\,t,n)=y_0-2\,y_0\,t+y_0\,t^2+2\,y_1\,t-2\,y_1\,t^2+y_2\,t^2[/math]

After we combine like terms and simplify the result, we finally arrive at the solution to the challenge.

[math]P_x(t)=(x_0-2\,x_1+x_2)\,t^2-2(x_0-x_1)\,t+x_0[/math]

[math]P_y(t)=(y_0-2\,y_1+y_2)\,t^2-2(y_0-y_1)\,t+y_0[/math]

 

where [math]\{t \in \mathbb{R} : 0\le t\le 1\}[/math]


Verifying the Result

We'll verify the solution by checking a known parabolic curve, [math]y=5-(1/5) x^2[/math]. We'll choose the points (-5,0) and (5,0) on the parabola to derive the third point of the triangle. The slope of the parabola at [math]x[/math] is [math]m=-(2/5)x[/math]. This allows us to use the point-slope form to find the lines that are tangent to the parabola at [math]x=-5[/math] and [math]x=5[/math]. Using these values we get:

[math]T_0(x)=2(x+5)[/math]

[math]T_1(x)=-2(x-5)[/math]

Solving for the point of intersection we get:

[math]2(x+5)=-2(x-5)[/math]

[math]x=0[/math]
[math]y=2(0+5)=10[/math]

Thus, the point in the middle, [math]P_1[/math], is located at (0,10). By using these points (-5,0), (0,10), and (5,0), we can check to see if the solution will produce the same parabolic curve. The following is a graph of both, [math]y=5-(1/5) x^2[/math] and the parametric equation using the specified points.

post-51329-0-58752500-1385699853_thumb.png

By using a little algebra we can tranform the parametric equation back into a function and prove that both curves are equal. Basically, we use the parametric equation for the [math]x[/math] coordinate and solve for [math]t[/math] in terms of [math]x[/math]. Then, we substitute that result into the parametric equation for the [math]y[/math] coodinate. The result is a standard function [math]y=f(x)[/math], which is equal to our test parabola. Thus, proving that these curves are in fact parabolas.

[math]x=((-5)-2\,(0)+(5))\,t^2-2((-5)-(0))\,t+(-5)=10\,t-5[/math]

[math]t=\frac{x+5}{10}[/math]

Substitute [math]t[/math] into the parametric equation for the [math]y[/math] coordinates.

[math]y=((0)-2\,(10)+(0))\,t^2-2((0)-(10))\,t+(0)=20\left(t-t^2\right)[/math]

[math]y=20\left(\frac{x+5}{10}-\frac{(x+5)^2}{10^2}\right)=5-\frac{1}{5}x^2[/math]

 

 

Interesting Shapes and Curves

 

If we reorder the vertices, then we can generate three different parabolic curves depending on the angles of the triangle and lengths of the sides.

 

post-51329-0-40796300-1385700976_thumb.png

 

If we take each curve, we can glue them together at their endpoints and generate a smooth closed region.

 

post-51329-0-97957700-1385701147_thumb.png

 

We can also glue the end points together to form smooth piecewise curves.

 

post-51329-0-85362500-1385701305_thumb.png

 

However, I like this shape the best.

 

post-51329-0-93496000-1385701399_thumb.png

 

 

 

As usual, I've attached the Mathematica 7 file for the challenge to this post.

 

TenthChallenge.zip

Edited by Daedalus
  • 1 month later...
Posted

I always seem to see the patterns in the numbers, and while playing around with the result of this challenge, I managed to extend the solution beyond parabolic curves:

 

[math]P_x(t)=(x_0-2\,x_1+x_2)\,t^2-2(x_0-x_1)\,t+x_0[/math]

[math]P_y(t)=(y_0-2\,y_1+y_2)\,t^2-2(y_0-y_1)\,t+y_0[/math]

 

where [math]\{t \in \mathbb{R} : 0\le t\le 1\}[/math]

 

If you look at the above result, you should notice some patterns that seem to be a recurring theme. As a bonus, I'll give anyone rep who can tell me what type of curve this new pattern entails. It's interesting, because I should've noticed this when I first worked the problem happy.png

  • 11 months later...
Posted (edited)

I believe there can be many Parabolas and Ellipses which may fulfill the condition of being tangential at [X0, Y0] and [X1, Y1] in the given triangle with [X2, Y2] as its apex.

 

................. I have a power cut and will continue later

 

>>>>>>>>>>>>>>>

 

PS : After thinking over this problem for a while I wanted to give my views here and started writing the above.

 

Only then I saw the preceding posts and found that it appears to be settled / solved and taken care of my points too.

 

Therefore I have nothing more to give here just now

Edited by Commander

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.