add tag
Anonymous 14035
I have a macro for solving quadratic equations (I use *polexpr* package). Please simplify this macro if possible.

```
\def\SolveIQuadraticEq#1#2#3{%
  \poldef #1;%
  \def\next##1(##2)##3\relax{%
    \xintdefvar a=coeff(##1,2);\xintdefvar b=coeff(##1,1);\xintdefvar c=coeff(##1,0);\xintdefvar DELTA=b^2-4*a*c;%
    \expandafter\def\csname #2\endcsname{\myfrac{-b/2/a}+\FracSquareRoot{DELTA/4/a^2}}%
    \expandafter\def\csname #3\endcsname{\myfrac{-b/2/a}-\FracSquareRoot{DELTA/4/a^2}}%
  }\next #1\relax
}
```
And then, I use 

```
\SolveIQuadraticEq{f(x) := 3x^2 - 4x - 5}{xone}{xtwo}
```

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.