Fitting quadratic curve to three constraints

Click For Summary

Discussion Overview

The discussion revolves around the process of fitting a quadratic curve to three constraints, specifically two points and an angle. Participants explore methods for solving this problem, including the use of differential equations and simultaneous equations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty in fitting a quadratic curve to two points and an angle, seeking clarification on the process.
  • Another participant requests the original example to better understand the context of the problem.
  • A participant proposes treating the problem as a differential equation, providing a general form of the parabola and suggesting how to translate the angle into a slope.
  • A later reply clarifies that the angle is at the same point as one of the points on the curve, simplifying the approach to finding the gradient.
  • One participant mentions challenges in solving the equations and expresses uncertainty about the classification of the problem, considering it may involve differential equations.
  • A participant shares that they found a solution using matrices for the simultaneous differential equations.
  • Another participant notes that finding the constants A, B, and C can be approached through simultaneous linear equations and suggests looking into cubic splines for fitting curves to four constraints.

Areas of Agreement / Disagreement

Participants express varying levels of understanding and approaches to the problem, with no consensus on a single method or solution. Some participants agree on the use of simultaneous equations, while others suggest different techniques, indicating a lack of resolution.

Contextual Notes

Participants mention the need for a general solution that could be scaled up to a cubic equation, indicating that the discussion may involve complexities related to higher-order polynomials.

Bob Smith
Messages
16
Reaction score
0
This should be easy but I've not done this in years and I'm feeling dense:

I need to fit a quadratic curve to three constraints, two of which are points, the third is an angle.

I've found examples to do this but only if all three constraints are points, so if someone would kindly explain the process I'd be a happy man. :)

Edit: I should add I've got an old example in front of me where I did just this (for a cubic equation though) but due to poor notes on my part I can't quite understand what I was doing.
 
Last edited:
Mathematics news on Phys.org
Can you post the old example, however poorly annotated?
 
I assume the two points you are given are points on the parabola but what is the angle?
 
One method is to treat it as a differential equation problem. All parabolas are solutions of

[tex]\frac{d^2y}{dx^2} = 2A[/tex]

for some constant A. Integrating, you get

[tex]y = Ax^2 + Bx + C[/tex]

Now, you have three parameters, and three conditions. Translate your angle into a slope, and you can write your conditions as

[tex]y(x_1) = y_1[/tex]

[tex]y(x_2) = y_2[/tex]

[tex]\left \frac{dy}{dx} \right|_{x_3} = \tan \theta[/tex]

then just solve for A, B, and C.
 
I should have been a bit more specific in my post.

I can form the two equations and the derivative equation for the constraints. The angle is also at the same point as one of the points the curve must fit, and sine the angle is zero (top of the curve), it is the same as the gradient, so no need to worry about converting.

The bit I got stuck as was what to do with the equations, i.e. how to solve. :) Like I said, it's been a long time since I touched this. I'll have a bit more of a play and see if I can get it to work.

Edit: I should add, once I've got this working, I'll want to add a fourth constraint that is the gradient of the other point (which will be non-zero), so need a general solution that I can scale up to a cubic equation. Thinking about it, perhaps if I try that from the beginning, it will make my old example easier to work from.

Edit again: nope, still no luck. If it weren't for the gradients this am I correct in thinking this is a simultaneous equations problem (which I can do), but as is, it involves differential equations (which I can't). So I probably made the thread in the wrong section too.
 
Last edited:
Well, thought I should add I got my solution by using matrices for the simultaneous differential equations. Cheers anyway. :)
 
hmm...finding the constants A, B, and C is just a matter of solving simultaneous linear equations...but I suppose that's what you did if you used matrices.

If you want a curve that conforms to four constraints in order to match a given angle at both endpoints, then you should look up "cubic spline".
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
21K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
8
Views
2K
Replies
1
Views
4K
  • · Replies 12 ·
Replies
12
Views
13K
  • · Replies 22 ·
Replies
22
Views
4K