# Computing singular locus

I have a bunch of homogeneous polynomials in 5 variables with specific arbitrary (symbolic) non-zero coefficients, i.e. some of them are zero and some of them are non-zero but I don't know the value. For instance:

$$F=a_0x_0f_3(x_1, x_2, x_3)+x_1^2f_2(x_0, \ldots, x_4)+x_0x_1g_3(x_0, x_1,x_2,x_3,x_4)$$

where $f_i, g_j$ are the polynomials with arbitrary non-zero coefficients of degree $i$, $j$, respectively, e.g. say that f_3 has all possible monomials of degree 3 in variables $x_1, x_2, x_3$ with arbitrary coefficients $a_1, a_2, \ldots$

I don't care much which field the coefficients belong to (but if you must know, let it be $\mathbb C$). I want to find the singular locus (i.e. the points $p\in \mathbb P^4$ where all partial derivatives $\frac{\partial F}{\partial x_i}(p)$ of $F$ simultaneously vanish) of one such $F$ in terms of symbolic coefficients and variables $x_i$. Is this something Sagemath can do? If so, can you give me a MWE? For the avoidance of doubt, I am happy to rewrite $F$ above to make the coefficients explicit (e.g. $F=a_0x_0x_1^3+a_1x_0x_1x_2^2+\cdots$).

Thank you.

By "singular", do you mean

points where all derivatves of $F$ wrt to $(x_0,x_1\dots,x_4)$ simultaneously vanish to 0 ?

or possibly points where two or more, but not necessarily all five, of those derivatives vanish ?

or something else ?

In https://www.singular.uni-kl.de/ftp/pu... there are some examples of investigating the singular locus. Singular is a part of Sage. In https://faculty.math.illinois.edu/Mac... one can find some examples of finding the singular locus with Macaulay 2 which can be used in Cocalc and Sage CellServer. Singular locus is also mentioned in https://doc.sagemath.org/html/en/refe... and https://trac.sagemath.org/ticket/3253

@Emmanuel Charpentier Thanks for your question. I mean the first option. I have edited accordingly. My apologies..

@achrzesz Thanks for your message. Is there a way to define in

https://doc.sagemath.org/html/en/refe...

z%5E2%20%2D%204x*z%5E3%20%2Dthe ideal with arbitrary coefficients instead of specific ones? The problem I find is that I don't want the coefficients to be treated as variables but as 'arbitrary non-zero constants'.

Do you mean

Note however:

(For a better solution see more comments)