## Using Hom4PS-3 in public Sage notebook

Sage is a free open-source mathematical software with features covering many aspects of mathematics, including algebra, combinatorics, numerical mathematics, number theory, and calculus. With the interface for Hom4PS-3, Sage is one of the easiest way to use Hom4PS-3.

Through our public Sage notebook server, you can use Hom4PS-3 now via an web browser

**without installing any software**. Simply follow the three easy steps.## Step 1: Access our public Sage notebook

First, open your web browser and head to hom4ps3.math.msu.edu and sign in with your user name and password. If this is the first time you are using this, you will need to create sign up for a new account by clicking the "

*sign up for a new Sage Notebook account*" link. After you have signed in, you should be able to see your existing worksheets, if there is any, as well as the option of creating a new worksheet. You can use any worksheet at this point.## Step 2: Import Hom4PS-3 interface

Once you are inside a Sage Notebook worksheet, first import the Hom4PS-3 interface by typing in and evaluate the command

import hom4pspy

## Step 3: Solve a system of equations

You can then create polynomials (using Sage), and then use one of the Hom4PS-3 solvers

**hom4pspy.solve_fast**which is optimized for medium to large sized polynomial systems and produces solutions with a lower accuracy**hom4pspy.solve_easy**which is optimized for medium to large sized polynomial systems and produces solutions with higher accuracy**hom4pspy.solve_small**which is optimized for smaller sized polynomial systems**hom4pspy.solve_real**which produces real solutions

## A trivial example

Let us look at a rather trivial example:

In this example, the command

R.<x,y> = CC['x','y']

creates a ring of polynomials in variables x and y with floating point complex coefficients. You are, of course, free to use rational coefficients or real coefficients by replacing CC with QQ and RR respectively. In the next two statements

f = x^2 - 3*x + 2

g = y^2 - 4*y + 3

create two polynomials f and g. Finally, the system, consisting of f=0 and g=0 is solved via the command

hom4pspy.solve_real ( [f,g] )

which finds the four real solution.

## Need help?

Just like with any Python module, one handy way for finding out the basic usage information of the functions included in the Hom4PS-3 interface is to type the command "

**help (hom4pspy)**" directly inside the Sage Notebook worksheet.It will a new window which shows the usage information:

To find out more information on how to use Hom4PS-3 or how it works, you can read the F.A.Q. page or the Documentation page. You are, of course, always welcome to email us as well.