1 | initial version |

It seems you want to create a function to create polynomials of degree two, in two variables $x$, $y$, of the form $a x^2 + b y - 1$.

The function would take $a$ and $b$ as arguments and return the polynomial above.

You could define the polynomial ring in $x$ and $y$ over $\mathbb{Q}$ as

```
R = PolynomialRing(QQ, ['x', 'y'])
x, y = R.gens()
```

and then define a function that takes $a$ and $b$ and outputs $a x^2 + b y - 1$:

```
def degree_two_polynomial(a, b):
return a*x^2 + b*y - 1
```

which you could use as follows:

```
sage: degree_two_polynomial(2, 3)
2*x^2 + 3*y - 1
sage: degree_two_polynomial(5, 1)
5*x^2 + y - 1
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.