If you know your relationship is going to be a polynomial, then there are some pretty (conceptually) simple ways you can do this.
If you know what degree your polynomial is (line, parabola, cubic, etc.) then your job will be much easier. But if not, then you simply need to look at the number of points you have.
- If you are given one point, the best you can do is of degree 0 ( y = k )
- If you are given two points, the best you can do is of degree 1 ( y = A x + B )
- If you are given three points, the best you can do is of degree 2 ( y = A x2 + B x + C )
- If you are given four points, the best you can do is of degree 3 ( y = A x3 + B x2 + C x + D )
- etc.
When I say "the best you can do", what I mean is -- if you have a parabola, but are only given two points, then you really can't identify the parabola. But you can say that it's a simple line.
Let's assume you have three points. The "best you can do" is assume that it is degree 2. If it is actually of degree one, your answer will magically turn into a line ( your x^2
coefficient will be 0
)
The basic idea of solving relationships/equations is:
If you have n
unknowns, you need n
equations/points.
Notice how, in the form of the Parabola ( y = A x2 + B x + C ), you have three unknowns? And also three equations! (points)
Let's pick three arbitrary points
x 1 2 4
y 6 7 3
You would set up three equations:
6 = 12 * A + 1 * B + C
7 = 22 * A + 2 * B + C
3 = 42 * A + 4 * B + C
Three equations, three unknowns. You should be able to solve this with a combination of most system-of-equation-solving rules.
In our case, we find:
A = -1
B = 4
C = 3
So our equation is y = -x2 + 4 x + 3
Note that, if your original three points formed a line, your $A$ would $= 0$
However, if your equation is NOT a polynomial, then you are left with little more than guess and check, plugging in various coefficients and trials (exponential? trigonometric?)
The beauty of the polynomial approach is that a polynomial of high enough degree will always fit any list of points. (provided that the points form a function)
Using The Pearson Complete Guide For Aieee 2/e
By Khattar as a point of reference for the items below.
You want to convert
$$\tag 1 x-2y-3=0$$
into normal (perpendicular) form.
We have:
$$Ax + By = -C \rightarrow (1)x + (-2)y = -(-3)$$
This means $C \lt 0$, so we divide both sides of $(1)$ by:
$$\sqrt{A^2 + B^2} = \sqrt{(1)^2 + (-2)^2} = \sqrt{5}$$
This yields:
$$\dfrac{1}{\sqrt{5}} x - \dfrac{2}{\sqrt{5}} y = -\dfrac{-3}{\sqrt{5}}$$
In normal form, this is:
$$\cos(\alpha)~x + \sin(\alpha)y = p \rightarrow \dfrac{1}{\sqrt{5}} x - \dfrac{2}{\sqrt{5}} y = -\dfrac{-3}{\sqrt{5}}$$
Note that this has a positive $x$ coordinate, and a negative $y$ coordinate, which puts us in the $4^{th}$ quadrant.
So, we have:
$$\cos(\alpha) = \dfrac{1}{\sqrt{5}}, \sin(-\alpha) = -\dfrac{2}{\sqrt{5}} , p = -\dfrac{-3}{\sqrt{5}} = \dfrac{3}{\sqrt{5}}$$
This gives us:
$$\alpha \approx 1.10714871779409 ~\mbox{radians}~ \approx 63.434948822922 {}^{\circ}$$
Since we are in the $4^{th}$ quadrant, we can write this angle as:
$$\alpha \approx 2 \pi - 1.10714871779409 ~\mbox{radians}~ \approx 5.176036589385497 ~\mbox{radians}~ \approx 296.565 {}^{\circ}$$
As another reference point, see $10.3.4$ (including examples) at Straight Lines.
Best Answer
Let $f(x)=\cos(x)\cos(x+2)-\cos^2(x+1)$
\begin{align} f'(x)&=-\sin x\cos(x+2)-\cos x\sin(x+2)+2\cos(x+1)\sin(x+1)\\ &=-\sin(2x+2)+\sin(2x+2)\\ &=0 \end{align}
So it is a constant function, i.e., a horizontal straight line.