Given the points of coordinates $(k, 2)$, $(\ell, 4)$, $(m, 8)$, I'm looking for:
- the parabolic polynomial $f(x)=a x^2 + b x + c$ that goes by these points
- and more specifically the value $n$ such that $f(n) = 0$
Of course, I know how to do this manually (simple exercise), but how to find this via Maple (or any online tool, not requiring to install a software locally)?
And now for a numeric example, using those solutions.
And we could plot it.
[edited below] I was asked to clarify some of the computations. The code starts with the following (and now I will not suppress output),
I want to substitute in values for
xandyin that formula forf, using each of the points in the listptsabove.Let's first look at this preliminary part. For each of the three "points", such as the first
[k,2], it constructs a list of the equations, such as[x=k, y=2]. Here's how just the first point could be handled, alone.But I want a one-liner that produces all three at once. I can use the
maporseqcommands for doing that. Each of the following constructs the same thing (and my original code happened to use the first of these approaches).The above list of lists of equations can be used to substitute into
ffor provide values forxandy.Here's how it could be done for just the first point. (I only need to do the second of these two commands. The first is shown just to illustrate what is being passed as the 2nd argument to the
evalcommand.But I wanted a one-liner that produces a list of three equations, where each is the result of subsituting for
xandyintofbased on each of the three points.Here again I'll show three ways to construct the thing I want in a one-liner. I happened to use the first of these originally, just because I think it's terse.
I hope that helps explain the initial construction of the three equations, which I then solved using the
eliminatecommand.