linear function - 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: linear function ( /thread-17866.html) |

linear function - Deiota - 12-29-2021 06:09 AM
I have a linear function, for instance, f(x)=2*x, I want to know which x I have to give me a f(x)=11226. This is just a basic and a dumb exemple just an explain my doubt. I know I to define my function App and the plot it and go to Num to view my function values. Also know how to determine my F(x) when x=15 for instance but I don know to do the opposite. F(9)=????. Just received my HP Prime G2 yesterday late and i'm just learning... sorry and thanks in advance! Deiota\ RE: linear function - roadrunner - 01-01-2022 12:03 AM
In CAS: f(x):=2*x solve(11226=f(x),x) -> {5613} f(9) -> 18 solve(5=f(x)) -> {5/2} -road RE: linear function - C.Ret - 01-02-2022 09:42 AM
Alternatively, since Dieota is currently in the long process of learning how to used its HP Prime. He may also discover other way to do it. The first on is to use the Function Application and the Menu/Fcn/Intersecion of the plot view. The easiest way to discover where \( f(x)=2.x \) is solution of the equation \( f(x)=11226 \) is to plot it. - Press Apps button and Active the Function application by touching the icon
- Enter the first part of the equation (aka the f(x) function definition) in the first slot. Use the expected capital X as variable in the slot F1 so that F1(X)=2*X.
- Enter the second part of the equation in the second slot. Here there is no variable. Simply enter the constant so that F2(X)=11226.
- In the Plot SHIFT Setup view, enter windows limits scaled to the large values of the example. To have a good view of the region of interest modify the X Range from -2 000 to +30 000 and Y Range from -1 500 to 20 000. Don't hesitate to change also X Tick and Y Tick up to 1000 since the constante value is huge.
- Plot the graph. The function f(x) is draw in blue and the constant 11226 is the horizontal red line.
- Touche the blue curve or select it with the cursor pad and activate Trace. Touch the screen to adjust plot windows.
- Find the intersection of the two curves. That is the point where the equation is solved. Select the blue curve. Touch Menu/Fcn and press 5 for Intersection.
- Select the intersection with the F2(X)=11226 curve.
- The cursor is at coordinate (5613,11226) indicating that f(x) = 11226 for x=5613
Another approach is to used the Linear Solver: - Press the Apps button, scroll the screen and touch the Linear Solver icon.
- Select 2x2 dimension solver
- In the first row of the matrix enter the function definition : 2.X + 0.Y = 11226
- In the second row of the matrix enter the second part of the equation: 0.X + 1.Y = 11226
- The solution to the equation is immediately displayed : X:5613 Y:11226
Another way is to use the Solver Application: - Press the Apps button, finger scroll the list, select the Solver Application by its icon.
- In the first slot E1 enter the equation as Y=2X
- Press the Num button to enter the solver
- In the Y box enter the constant 11226 so that Y:11226
- Select the X box and touch Solve. Immediately the solution appears X:5613
A simplest way of solving \( f(x) = 11226 \) with \( f(x)=2.x \) in CAS mode: - Enter CAS mode by pressing the CAS key
- Press the Vars key to verify that no 'x' is already define. Eventually select the 'x' entry in the menu and delete it by pression the DEL key.
- In the command line of the CAS page enter the equation \( 2x=11226 \) . You may enter the \( x \) variable (lower case or use the xtθn key.
Press ENTER. The equation 2*x=11226 is displayed. - Make the coefficient in front of x to disappear. Simply divide the whole equation by two.
Press / and 2. The command line display Ans/2. Press ENTER. The solution is x=5613
Etc... As you may have understand, there is a multitude of way for solving \( f(x)=11226 \) and you don't have to made a program or to know specific syntax. Of course, the way explain by road is valid. You canuse HOME view for the seek of numeric solutions (numerical application cases) and CAS view for the seek of literal solutions (academic and more general symbolic solutions). This are really powerful numeric or symbolic methods. But there is a plétore of methods and applications easy to use, intuitive with efficient and clear display of results with no programming ! Same are complex, other are really simple. The simplest I jave found; in HOME view, type-in 11226 / 2 ENTER, the solution is show |