How to do this on my Prime ? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: How to do this on my Prime ? (/thread-9192.html) |
How to do this on my Prime ? - ggauny@live.fr - 09-29-2017 11:56 AM Hi, I am learn how to calculate a fonction of parabole with 3 points given. Me I do at hand pincil and paper, after I have resolve I obtain a system of 3 equations what I resolve with app linear solver. But I have to calculation by hand the system as I say. On internet I have see on a computer hand I dont' know the name a solution automatic, which I have tryied on Prime but no work. May be is a way to do same ? In attachement I give what I do with hand and the other picture, may be you help me to do with Prime. Because I know how to do with hand ,it save me time for excercizes further if there is a solution automatic with Prime. I hope it is clear because it is difficult for me to speek american. RE: How to do this on my Prime ? - AlexFekken - 09-29-2017 12:26 PM 1 - The quickest way might be to determine the Lagrange polynomial: lagrange([1 -2 3], [2 1 4]) (then simplify the result). 2 - If you really want to solve the linear equations then you can do that as follows: linsolve([a+b+c=2 4*a-2*b+c=1 9*a+3*b+c=4], [a b c]) 3 - Or if you want to imitate the approach in your second screenshot: f(x):=a*x^2+b*x+c solve({f(1)=2,f(-2)=1,f(3)=4},[a b c]) RE: How to do this on my Prime ? - Dieter - 09-29-2017 12:32 PM (09-29-2017 11:56 AM)ggauny@live.fr Wrote: I am learn how to calculate a fonction of parabole with 3 points given. I am sure there is a more elegant way on the Prime, but all you need is the linear equation solver. For a parabola the equation system is as follows: Code: | x1² x1 1 | → | y1 | So simply start the linear solver and fill the matrix. Consider the example in your screenshot: Enter the x-values into the center column and the y-values on the right-hand side: Code: | _ 1 _ | → | 2 | Fill the left column with the squares of the center column: Code: | 1 1 _ | → | 2 | Fill the right column with 1s: Code: | 1 1 1 | → | 2 | Now solve this system and you're done. Dieter RE: How to do this on my Prime ? - Gerson W. Barbosa - 09-29-2017 12:52 PM Interesting ideas in this old thread (others, not mine). RE: How to do this on my Prime ? - AlexFekken - 09-29-2017 01:22 PM (09-29-2017 12:52 PM)Gerson W. Barbosa Wrote: Interesting ideas in this old thread (others, not mine).Thanks for that link. And as you already suggested: Cramer's Rule is not very efficient in general and should probably be avoided for numerical calculations, especially when the dimension goes up. And I am not 100% sure, but I seem to remember that the determinant calculations are also quite sensitive to rounding (not if all you care about are integer x values of course). Again, this becomes more of a problem as the dimension goes up. RE: How to do this on my Prime ? - ggauny@live.fr - 09-29-2017 02:59 PM Hi, One again many thank you at all. You are great teachers mathematician ! Have a good day. RE: How to do this on my Prime ? - toshk - 09-29-2017 04:53 PM (09-29-2017 12:32 PM)Dieter Wrote:[[2],[1],[4]]/vandermonde([1,-2,3])(09-29-2017 11:56 AM)ggauny@live.fr Wrote: I am learn how to calculate a fonction of parabole with 3 points given. for ill/weird/large/spare matrix: try LSQ(vandermonde([1,-2,3]),[[2],[1],[4]]) |