02-05-2017, 10:51 PM

1-AUG-2019 (Ver. 1.10Beta)

CHANGELOG

To update, first save your library files if you have modified any systems of equations. See the eqlib.pdf manual file for a program that exports library files into notes that can be edited on a computer. (The connectivity kit can also be used to view/edit notes.) It is always good practice to back up your libraries regularly.

Download links at bottom of post.

ABOUT THE APP

This app is intended to replicate and combine programs from the HP48 series of calculators for organizing equations and launching an equation solver. While there are a few user-created programs/apps that help manage equations, most of them have the formulas built-in (hard-coded into the source code of the program/app). This app attempts to allow users to build their own equations library. The user can then also launch a numerical solver. Using the built-in Solve app may be adequate for some users, but it lacks the ability to handle more general systems.

The current Solve app is quite deficient in that in requires the number of equations in a system be the same as the number of variables. Therefore, over-determined or under-determined systems cannot be solved numerically. Usually under-determine systems have an infinite number of results, and a numerical solver should ideally try to return a solution that is as close to the initial guess as possible. For over-determined systems, a solution usually does not exist. Most numerical solvers would return a "least-squares" solution.

This app implements the Newton-Raphson algorithm for solving a system of equations. In order to handle ill-conditioned, over-determined, under-determined, rank-deficient (etc.) Jacobian matrices, the SVD is used to determine the pseudo-inverse of the Jacobian (the pseudo-inverse coincides with the regular inverse of a matrix for non-singular matrices). Users have reported that the app can handle complex values just fine. Minimal testing seems to confirm this.

INSTALLATION AND USAGE

(Please refer to the reference manual included in the zip file)

REFERENCE MANUAL

The reference manual will likely see another update in which all the images are updated to nicer, crisp images created by \( \LaTeX\ \) and ps-tricks. For now, though, I will leave them there so that there is at least some frame of reference, and for old time's sake. The equations will also likely get a face lift as the variables are updated to follow typical mathematical conventions (e.g. subscripts). While the HP Prime currently does not support subscripted variables, the correspondence between the calculator's variables and those in the reference manual should be obvious (e.g. \( v_0 \) vs. \( \tt{v0} \) ).

If you notice any typos, please let me know.

OTHER NOTES:

There are two versions: a merged version (SVD merged into the source code for Equation Library) and the separated version. Does it make a difference which version I use? Yes, if you plan to work with under/over determined systems or systems whose Jacobian is either singular or near singular, it can make a major difference. The separated version (i.e. not merged) is slightly more accurate. As of the 2018 10 16 firmware release (press [Help] (Tree) (About) to see your firmware version), it appears that an issue with CAS corruption has been fixed. What this will likely mean is that the app will move toward a single release.

PRIOR CHANGES:

25-MARCH-2017 (Ver. 1.000)

08-MAR-2017 (Ver. 0.900)

TODO

DOWNLOADS

Version 1.10 Beta: Attached in this recent post

Version 1.000 (same file name, just re-download to get the update)

[attachment=4561]

CHANGELOG

- Fixed issues with fraction mark and separator characters. (Setting digits to 1234,56 using "," as the fraction mark would lead to unexpected behavior; should be fixed now).
- Preparing app for more inverse options (e.g. QR).
- Pressing [Shift][Plot] to access the library settings now has a new drop-down option to select which library to use. (Create new libraries by simply typing AFiles("My Library.lib"):={} and "My Library" will appear as an option.)

To update, first save your library files if you have modified any systems of equations. See the eqlib.pdf manual file for a program that exports library files into notes that can be edited on a computer. (The connectivity kit can also be used to view/edit notes.) It is always good practice to back up your libraries regularly.

Download links at bottom of post.

ABOUT THE APP

This app is intended to replicate and combine programs from the HP48 series of calculators for organizing equations and launching an equation solver. While there are a few user-created programs/apps that help manage equations, most of them have the formulas built-in (hard-coded into the source code of the program/app). This app attempts to allow users to build their own equations library. The user can then also launch a numerical solver. Using the built-in Solve app may be adequate for some users, but it lacks the ability to handle more general systems.

The current Solve app is quite deficient in that in requires the number of equations in a system be the same as the number of variables. Therefore, over-determined or under-determined systems cannot be solved numerically. Usually under-determine systems have an infinite number of results, and a numerical solver should ideally try to return a solution that is as close to the initial guess as possible. For over-determined systems, a solution usually does not exist. Most numerical solvers would return a "least-squares" solution.

This app implements the Newton-Raphson algorithm for solving a system of equations. In order to handle ill-conditioned, over-determined, under-determined, rank-deficient (etc.) Jacobian matrices, the SVD is used to determine the pseudo-inverse of the Jacobian (the pseudo-inverse coincides with the regular inverse of a matrix for non-singular matrices). Users have reported that the app can handle complex values just fine. Minimal testing seems to confirm this.

INSTALLATION AND USAGE

(Please refer to the reference manual included in the zip file)

REFERENCE MANUAL

The reference manual will likely see another update in which all the images are updated to nicer, crisp images created by \( \LaTeX\ \) and ps-tricks. For now, though, I will leave them there so that there is at least some frame of reference, and for old time's sake. The equations will also likely get a face lift as the variables are updated to follow typical mathematical conventions (e.g. subscripts). While the HP Prime currently does not support subscripted variables, the correspondence between the calculator's variables and those in the reference manual should be obvious (e.g. \( v_0 \) vs. \( \tt{v0} \) ).

If you notice any typos, please let me know.

OTHER NOTES:

There are two versions: a merged version (SVD merged into the source code for Equation Library) and the separated version. Does it make a difference which version I use? Yes, if you plan to work with under/over determined systems or systems whose Jacobian is either singular or near singular, it can make a major difference. The separated version (i.e. not merged) is slightly more accurate. As of the 2018 10 16 firmware release (press [Help] (Tree) (About) to see your firmware version), it appears that an issue with CAS corruption has been fixed. What this will likely mean is that the app will move toward a single release.

PRIOR CHANGES:

25-MARCH-2017 (Ver. 1.000)

- Major updates to reference manual
- Added support for animated diagrams (see Oscillations > Mass-Spring System)
- Library file format modified slightly (see ref. manual)
- Minor fix in library file for Conduction+Convection system (L1-L3 changed to l1-l3)
- Added option to revert to Solve app engine if anyone needs it
- Fixed deletion bug when library has more than 70 systems
- Systems may now be saved with diagram information
- Preliminary support for switching libraries (i.e. future update will allow users to have multiple libraries rather than saving everything into a single library)
- Information during solve process much more informative
- New icon (top half of old HP Solve application card)

08-MAR-2017 (Ver. 0.900)

- Added pictures; press [View] > View Picture
- Currently supports picture viewing; cannot save systems with a picture yet
- Fixed some typos in the reference manual
- This update modifies the Equation Library.lib file to add a 9th (picture data)

TODO

- Add a command to allow solving without using the app interface: ssSolve({ equations }, { vars }, { initial guesses })
- Add options to use other inverse techniques (e.g. QR, LU, or regular \( A^{-1} \)) to improve upon the solving speed
- Curve fitting like in SolveSys from the HP48/HP49/HP50 days
- Move all strings into a single list for localization.
- Implement numerical approximation of the Jacobian (right now, it is computed using the CAS which could potentially cause issues.
- Units

DOWNLOADS

Version 1.10 Beta: Attached in this recent post

Version 1.000 (same file name, just re-download to get the update)

[attachment=4561]