[Question]
  [
# Introduction
Humans are a remarkable species, but we can be very awkward to understand sometimes—especially for computers. 
In particular, we seem to like writing polynomials in a very convoluted fashion with seemingly arbitrary rules. 
What is the shortest program you can write to format a polynomial correctly using these rules?
# Challenge
Input
> 
> A list of integers between -1000 and 1000 (inclusive), representing the coefficients of a polynomial, with the last entry being the coefficient of x^0 (the constant), the second last being the coefficient of x^1, etc.
> 
> 
> 
Output
> 
> A string representing this polynomial in the correctly formatted mathematical notation of humans.
> 
> 
> 
## Rules:
* The sign on the leading coefficient is only shown if it is negative.
`Right: -x^2+3` 
`Wrong: +x^2+3`
* Components with coefficient of 0 are not printed (except for the corner case where all coefficients are 0\*).
`Right: x^5-x^2+3` 
`Wrong: x^5+0x^4+0x^3-x^2+0x+3`
* Coefficients `-1` and `+1` are to be displayed without the 1, unless they are the constant.
`Right: x^5-x^2+1` 
`Wrong: 1x^5-1x^2+1`
* The exponent is only shown if it is greater than 1 and the variable is only shown if the exponent is greater than 0.
`Right: 3x^3-7x^2+2x+1` 
`Wrong: 3x^3-7x^2+2x^1+1x^0`
* \*Corner case: while zero values usually result in not printing that component, if all coefficients are zero the constant 0 should be printed.
`Right: 0` 
`Wrong: 0x+0`
`Wrong: (nothing)`
* This is code-golf so the winner will be the program with the fewest bytes.
# Example Input and Output
```
Input:                  Output:
      [0]                      0
      [0,0]                    0
      [0,-1,35,0]             -x^2+35x
      [5,1,7,-9]               5x^3+x^2+7x-9
      [100,0,0,-1]             100x^3-1
      [931,21,-11,1]           931x^3+21x^2-11x+1
```
I look forward to seeing your solutions. Have fun!
# EDIT:
* You can surround operations by whitespace if you wish. So `3x+5` and `3x + 5` are both fine. `3x+ 5` and `3x +5` are not.
* If you want to produce actual exponent characters (say in Tex) that is allowed as it is even closer to how humans write.
* Coefficients must appear without any decimals e.g. `9x^2` is correct, `9.0x^2` is not.
  
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 56 bytes
```
(?=( \S+)+)
x^$#1
\b0x.\d+ 
\b1x
x
x.1 
x 
 0
 -
-
 
+
```
[Try it online!](https://tio.run/##FYkxCoAwEAT7fcWCCpGQcIeIWIilD7ANoqKFjYVY5PcxMgwMzHO@172lykxrMuNgGGZb2xpxKQtF2CX6cFgip0ZkvBKRoAB0cCBsSgLhr1M2vs3ZUtnR9VDJh/@BKuUD "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
(?=( \S+)+)
x^$#1
```
Insert all of the powers of `x`, including `x^1` but not `x^0`.
```
\b0x.\d+ 
```
Delete all powers of `x` with zero coefficients, but not a trailing `0` (yet).
```
\b1x
x
```
Delete a multiplier of `1` (but not a constant `1`).
```
x.1 
x 
```
Delete the `^1` of `x^1`.
```
 0
```
Delete a constant 0 unless it is the only thing left.
```
 -
-
```
Delete the space before a `-`.
```
 
+
```
Change any remaining spaces to `+`s.
[Answer]
# JavaScript (ES6), ~~107~~ 106 bytes
```
a=>a.map(c=>c?s+=(c>0&&s?'+':_)+(!--e|c*c-1?c:c<0?'-':_)+(e?e-1?'x^'+e:'x':_):e--,e=a.length,_=s='')&&s||0
```
[Try it online!](https://tio.run/##dc3PjoIwEAbwu0@BF1u2HWyXECPZ0gcxYJpx/BcEszWbHnh3tkTXA8nO8ZvffHN1P87j9@X@gK4/0Hg0ozOVy27uztFUaL0wHCu1WnnLBCv3qeBLABrwA0FbLPFLWQbPBVmKGQsNE1SyMIUlAUgyLmupOz3Ocm@8YSyNdcOgRuw737eUtf2JH/lO1cnfpGmyXieJWsyJfKP/CWiZFxN8EgjNp8iLMIeF1HIjYVu/u4rQ5GLSmwDbOdcqPpdTe/3iMYkHoMdf "JavaScript (Node.js) – Try It Online")
### How?
The output is built by applying the following formulas to each coefficient **c** of the input array **a[ ]** while keeping track of the current exponent **e**.
**1st formula: plus sign**
If the coefficient is strictly positive and this is not the first term in the output expression, we append a `+`. Otherwise, we append nothing.
```
c > 0 && s ? '+' : _
```
**2nd formula: minus sign and coefficient**
If the exponent is zero or the absolute value of the coefficient is not equal to 1, we append the coefficient (which may include a leading `-`). Otherwise, we append either a `-` (if the coefficient is negative) or nothing.
```
!--e | c * c - 1 ? c : c < 0 ? '-' : _
```
**3rd formula: variable and exponent**
If the exponent is 0, we append nothing. If the exponent is 1, we append `x`. Otherwise, we append `x^` followed by the exponent.
```
e ? e - 1 ? 'x^' + e : 'x' : _
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 37 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
┴₧↕ê♦•Vªâÿσ9s╘dσ■à@@ⁿ■o─╦ñºº┌x╡ER▓ δ¿
```
[Run and debug it online](https://staxlang.xyz/#p=c19e1288040756a68398e53973d464e5fe854040fcfe6fc4cba4a7a7da78b54552b220eba8&i=[0]%0A[0,0]%0A[0,-1,35,0]%0A[5,1,7,-9]%0A[100,0,0,-1]&a=1&m=2)
Here's the unpacked, ungolfed version.
```
r{          reverse the input and map using block ...
  |c        skip this coefficient if it's falsy (zero)
  0<.+-@    sign char; e.g. '+'
  _|aYv i!+ abs(coeff)!=1 || i>0
    y$      str(abs(coeff)); e.g. '7'
    z       ""
  ?+        if-then-else, concatenate; e.g. '+7'
  "x^`i"    string template e.g. 'x^3' or 'x^0'
  iJ(T+     truncate string at i*i and trim. e.g. 'x^3' or ''
mr$         re-reverse mapped array, and flatten to string
c43=t       if it starts with '+', drop the first character
c0?         if the result is blank, use 0 instead
```
[Run this one](https://staxlang.xyz/#c=r%7B+++++++++%09reverse+the+input+and+map+using+block+...%0A++%7Cc+++++++%09skip+this+coefficient+if+it%27s+falsy+%28zero%29%0A++0%3C.%2B-%40+++%09sign+char%3B+e.g.+%27%2B%27%0A++_%7CaYv+i%21%2B%09abs%28coeff%29%21%3D1+%7C%7C+i%3E0%0A++++y%24+++++%09str%28abs%28coeff%29%29%3B+e.g.+%277%27%0A++++z++++++%09%22%22%0A++%3F%2B+++++++%09if-then-else,+concatenate%3B+e.g.+%27%2B7%27%0A++%22x%5E%60i%22+++%09string+template+e.g.+%27x%5E3%27+or+%27x%5E0%27%0A++iJ%28T%2B++++%09truncate+string+at+i*i+and+trim.+e.g.+%27x%5E3%27+or+%27%27%0Amr%24++++++++%09re-reverse+mapped+array,+and+flatten+to+string%0Ac43%3Dt++++++%09if+it+starts+with+%27%2B%27,+drop+the+first+character%0Ac0%3F++++++++%09if+the+result+is+blank,+use+0+instead&i=[0]%0A[0,0]%0A[0,-1,35,0]%0A[5,1,7,-9]%0A[100,0,0,-1]%0A[-1000,-1000,-1000]&a=1&m=2)
[Answer]
# Python 3, ~~279~~ ~~277~~ ~~258~~ 251 bytes
```
k=str.replace
def f(x):
 z=len(x)
 y='--'*(['-1']==[c for c in x if'0'!=c][:1])
 for i,v in enumerate(x):
  p=str(z+~i)
  if v in'-1'and~i+z:y+='+x^'+p
  elif'0'!=v:y+='+'+v+'x^'+p
 return y and k(k(k(k(y[1:],'+-','-'),'^1',''),'x^0',''),'-+','-')or 0
```
Takes input as a list of strings. This solution is not highly golfed yet. This basically works by replacing things to suit the output format, which highly increases the byte count.
[Try It Online!](https://tio.run/##XY/RioMwEEXf/YrZp9FNUgxlWVbIl4iC2MiG2lSyVtSH/ro701goJQ@5mXPnzmRYxt@rP6r2cW/b2fyN4RDs0DetTU62gy6dsyKB1fTWk0xgMagUfqYlKo2VMWUL3TVAC87DDK7DHD9MW5WFrsjNyMmJofW3iw3NaGMiDDwrXcXdkY8agV0c2vjT3Ym1WIRBMdcoBuK236OnWEcxCdxhsOMteFiAOuGcxrOUuqgkCoUSFWYSa02KxVznu1IiQloy34bg/Jh29DHGOVZZlrzW3t@Sd5V4PHw97fDCFVeZf7Px561b53EGWXQMIr79Aw)
*Special thanks to ovs and NK1406*.
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 41 bytes
```
p->concat([c|c<-Vec(Str(Pol(p))),c!="*"])
```
[Try it online!](https://tio.run/##LYzBCsIwEER/Zc1pI7uQIEUE228QBC8hh7BYKZR2CbkI/ntM0MvMPGYYTXnhl9YZxqo8yb5JKhjkI1d@PAXvJeNtX1GttSSH0RxNtDWprm9U4Ak0L1tBJTCdDMx9ShCCi00d/Y09nYYfDOTpTHzp2bu2oF7HdvsF "Pari/GP – Try It Online")
---
If an `*` between the coefficient and the variable is allowed:
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 3 bytes
```
Pol
```
[Try it online!](https://tio.run/##K0gsytRNL/ifpmD7PyA/539iQUFOpUaBgq6dQkFRZl6JRoGOghKIp6SQplGgqamjEB1tEAskDXSglK6hjrEphGOqY6hjrqNrCWIbGgBV6ICkY2M1/wMA "Pari/GP – Try It Online")
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), ~~114~~ ~~113~~ ~~109~~ ~~107~~ 106 bytes
```
{{⍵≡'':⍕0⋄⍵↓⍨'+'=⊃⍵}∊⍵{{'1x'≡2↑1↓⍵:¯1⌽1↓1⌽⍵⋄⍵}('-0+'[1+×⍺]~⍕0),∊(U/⍕|⍺),(U←⍺≠0)/(⍵>⍳2)/¨'x'('^',⍕⍵)}¨⌽⍳⍴⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@/uvpR79ZHnQvV1a0e9U41eNTdAuK3TX7Uu0JdW932UVczkF/7qKMLSFVXqxtWqAMVGz1qm2gIVrTV6tB6w0c9e0E8EA3SDDaiVkNd10BbPdpQ@/D0R727YutApmvqAA3SCNUHsmuAgpo6GqGP2iYAWY86Fxho6msA9dk96t1spKl/aIV6hbqGepy6DlAtUFiz9tAKsPGbH/VuARn//1HfVE9/oG4DLjcgOVS9wQX0BlCvm4KOAZxpgMIGOkzH2BRJyFTHUMccKGwJFzE0AGrRASv9DwA "APL (Dyalog Classic) – Try It Online")
-4 bytes thanks to @dzaima!
This can definitely be golfed down further. This requires `⎕IO←0`
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 78 bytes
```
(RV(B."x^"._MERVg)J'+)R[`\b0[^+]+``x.0|\^1|^\++|\++$``\b1x``\++-?`][xx'x_@v]|0
```
Takes the coefficients as command-line arguments. [Try it online!](https://tio.run/##K8gs@P9fIyhMw0lPqSJOSS/e1zUoLF3TS11bMyg6ISbJIDpOO1Y7IaFCz6AmJs6wJi5GW7sGiFUSgJKGFUBSW1vXPiE2uqJCvSLeoSy2xuD///8G/3UN/xub/jcAAA "Pip – Try It Online")
Uses `ME` (map-enumerate) and `J` (join) to generate something of the form `0x^3+-1x^2+35x^1+0x^0`, and then a bunch of regex replacements to transform this into the proper format.
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), ~~79~~ 76 bytes
```
{'^$' '\b1x' '\+?¯' '^\+'⎕r('0x-',⊂⍬)∊⍕¨(0≠⍵)⌿'+',⍵,⊖⍪((⊢↓⍨2≤⊢)↑'x^',⍕)¨⍳≢⍵}
```
[Try it online!](https://tio.run/##NY2xSsRAEIb7fYothEnYLOwmhCM2vsgRiHdEgoFILsWKXCMSTHRFkVjLYRFEuEKusTnIo8yLxFnBZub/5/t/Jrsq5fo6K6sLuSqzzaZYzfg0FBW2z2rOad5AegIclufauCXOpj3tdCmAcrUHykgIsL9F@@XjfY92mEZPYfeO9uDj4xEEYXugyBvaT8/DfoftK9oxxO6DjI/tC5jUhQZ/GtF@Y7ejwnaeG/eeJB1qkjnan9M15FlRAkkCNT7cQXUJW@YFym8CUMAUV/9i2msexeRBmjQUUWyAxVzzBZGkgdikkXBgYWQCTCuq8r9WA2SISg0siTQPtbtqToCsq4U0Q6m1ERp@AQ "APL (Dyalog Classic) – Try It Online")
[Answer]
# Python 3, 161 162 bytes
*Fixed a bug thanks to ovs.*
```
l=len
lambda p:''.join(['+'*(i>0)*(c>0)+(str(c)[:-1],str(c))[abs(c)!=1or i==l(p)-1]+'x'*(i!=l(p)-1)+('^%d'%(l(p)+~i))*(i<l(p)-2)for i,c in enumerate(p)if c])or'0'
```
Expanded:
```
l=len # Alias the len function since we use it a lot
lambda p: ''.join([ # Join a list of strings
    '+'*(i>0)*(c>0) # Prepend a + if this isn't the first term and the coefficient is positive
    + (str(c)[:-1], str(c))[abs(c) != 1 or i == l(p) - 1] # If the coefficient is 1 and this isn't the last term, delete the '1' from the string representation, otherwise just use the string representation
    + 'x' * (i != l(p) - 1) # If this isn't the last term, append an x
    + ('^%d' % (l(p) + ~i)) * (i < l(p) - 2) # If this isn't one of the last two terms, append the exponent
for i, c in enumerate(p) if c]) # Iterating over each coefficient with its index, discarding the term if the coefficient is zero
or '0' # If all of the above resulted in an empty string, replace it with '0'
```
[Answer]
# [C#](https://docs.microsoft.com/en-us/dotnet/csharp/), 237 bytes
```
c=>{var b=1>0;var r="";int l=c.Length;var p=!b;for(int i=0;i<l;i++){int n=c[i];int e=l-1-i;var o=p&&i>0&&n>0?"+":n==-1&&e!=0?"-":"";p=n!=0?b:p;r+=n==0?"":o+(e==0?$"{n}":e==1?$"{n}x":n==1||n==-1?$"x^{e}":$"{n}x^{e}");}return r==""?"0":r;}
```
[Answer]
# [Clean](https://clean.cs.ru.nl), 172 bytes
```
import StdEnv,Text
r=reverse
@""="0"
@a|a.[size a-1]<'0'=a+"1"=a
? -1="-"
?1=""
?a=a<+""
$l=join"-"(split"+-"(join"+"(r[?v+e\\v<-r l&e<-["","x":map((<+)"x^")[1..]]|v<>0])))
```
[Try it online!](https://tio.run/##RYlNS8QwFEX3@RXhOTgtaUqLO0lsF7oQXAjjrtOBRyeVSD5KmilV5rcbiy7c3HvuuYNR6JL154tR1KJ2SdvJh0gP8fzkluJNrZEEGdSiwqxICyChAtLiFctu1l@KIq97sa/2EhnUIJE0lNcSOJBmqy1RomAb7Iz88NptTzZPRkdgG/0aBlnomoWp43ERPFBzqwTvAApY4d7ilGWC5bCeIO/qsuz76yIeqj7P83SIGCK5oePFDVF7RyVt/Y7If0G7u6LqKaXpexgNvs@JP7@kx0@HVg9/49VgHH2wPw "Clean – Try It Online")
[Answer]
# Wolfram Language/Mathematica, 39 bytes
```
TraditionalForm@Expand@FromDigits[#,x]&
```
[Try it online!](https://www.wolframcloud.com/objects/bbe24a71-2110-459a-b9a4-f297c2911db3)
Turns out there is a built-in to get in in the right order.
Previous solution:
## Wolfram Language/Mathematica, 93 bytes
```
StringReplace[StringRiffle[ToString/@InputForm/@MonomialList@FromDigits[#,x],"+"],"+-"->"-"]&
```
~~At least to me, this is suprisingly long for a language designed for mathematical manipulation. It seems like `Expand@FromDigits[#,x]&` should work, but the default ordering for polynomials is the reverse of what the question requires, so some extra finagling is required.~~
### Explanation
```
FromDigits[#,x]               converts input list to polynomial (technically converts to a number in base x)
MonomialList@                 gets list of terms of polynomial
InputForm/@                   converts each term to the form a*x^n
ToString/@                    then to a string version of that
StringRiffle[...,"+"]         joins using +'s
StringReplace[...,"+-"->"-"]& replaces +-'s with -'s
```
[Answer]
Python3: ~~150~~ 146 bytes
```
f=lambda l:''.join('+-'[a<0]+str(a)[a<0:5*((abs(a)!=1)|(1>i))]+'x^'[:i]+str(i)[:i-1]for i,a in zip(range(len(l)-1,-1,-1),l)if a).lstrip('+')or '0'
```
(previous implementations):
```
f=lambda l: ''.join('+-'[a<0]+str(a)[a<0:5*((abs(a)!=1)|(1>i))]+'x^'[:i]+str(i)[:i-1] for i,a in zip(range(len(l)-1,-1,-1),l) if a).lstrip('+') or '0'
```
You can [*try it online*](https://tio.run/##hY/BboQgEIbv@xQ0PcAU2IDEbDTdvojRhG3XLQ1F43qgTd/dgibLag8lBGaY7/@Z6b/G984p/jrf09Qerf48vWlkS4z3H51xBFOOK/0sanodB6IhxmX@RIg@XUP6cJTwQ@SLAagp9g2uSrOgBkLIZd12AzJMI@PQt@nJoN3lTOzZEQtcsnkDs2BapGFvgzJAmGIIMizw1A/GjaQllWCiBtilfJ1FJzUjKL3ynEl2YLxYsVIELybjz38c0f16vEVit@njfyr2kyf2RnHfZFTlPrF3TW4dc98oGgUHz4vtBGIZYK0IpaDhMsGFkiyLw0q24AkOpfhBFs4s1D2V0y8)
Kudos to: @Benjamin
[Answer]
# [Perl 5](https://www.perl.org/) `-a`, 94 bytes
```
($_=shift@F)&&push@a,@a*!/-/>0&&'+',@F?s/\b1\b//r:$_,@F>0&&'x',@F>1&&'^'.@F while@F;say@a?@a:0
```
[Try it online!](https://tio.run/##HYndCoIwGEBfZYFs/Ti3rxDCSL@r3fUGknyCsYHkcEb18q0V5@Zwjh/msYxxnXXnYN1tQbPh3D@CRcqRtislVa05FzuRo2mCantoe6XmKutS@K/Xb9WQ7CoKNOxp3TigOQV6IzVIlY5RsyMDYJrtgUk4JE3AZ/KLm@4hyktZaNBR0hc "Perl 5 – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 113 bytes
```
\w+
a$'b$&
a( [^b ]*)*?b(\d+)
$2x^$#1
(\^1|x\^0)(?!\d)
(?<= |-|^)(1(?=x)|0[^ -]*)
([ -])*
$1
[ -]$|^ 
^$
0
 
+
```
[Try it online!](https://tio.run/##FYuxDsIwEEP3@wojAlxanZQrlFKJqiMf0RDRqgwsDAiJDvn3kMqDbT378/y@3mPa8e2R/K@k0Rwms6eRMYQJ98IW/cR@Li2Zaglmq8Q@aFx8cJb7jZ8tEffXDlFisKzcd4uNbgiQfM5syMEWZJTWZGIAUTDkCFSmVEPRQFpS57BKlLJlLKrQ3FtcIA3OkBonyBFV3sD9AQ "Retina 0.8.2 – Try It Online")
I'm sure there is a lot to golf here...
[Answer]
# [Haskell](https://www.haskell.org/), ~~166~~ 163 bytes
```
g s|l<-length s,v:w:r<-id=<<["- +"!!(1+signum m):(id=<<[show$abs m|abs m>1||e==0]++["x"|e>0]++['^':show e|e>1])|(e,m)<-zip[l-1,l-2..]s,m/=0]=[v|v>'+']++w:r|1<3="0"
```
[Try it online!](https://tio.run/##dY7RaoMwFIbv9xSnYaCSxJmKlEriE2xXuxQFy4LKEieNtTLy7i46OtbSnouQk3wf/99U5lMqNc81GKs4VbKrhwYMGdNzeuS0/RCc54gCRpuNz7Bp6@6kQQep//tlmq/zc3UwoO16ZsxaKURUYJyjCVmZrVev9NIFBeleWBFYXxIdcPrd9rmijCi6DcPCEP3iVJGPdsw87DnTtbCMxwJFaNZV24EAXfVv4Pen4X04vnYQQh1A/gTr5FFB4M5Q@n@L/mhyl39Iu6Zxcutc0XQqtzhOpouTEEZ2hO5vYq4TkqmM8SLuJrq/mCxy7ciSWRQPTQc5l7L5Bw "Haskell – Try It Online") Example usage: `g [0,-1,35,0]` yields `"-x^2+35x"`.
---
Previous 166 byte solution, which is slightly better readable:
```
0#n=show n
m#n=id=<<[show n|n>1]++"x":['^':show m|m>1]
m%0=""
m%n|n<0='-':m#(-n)|1<3='+':m#n
g s|l<-length s,v:m:r<-id=<<zipWith(%)[l-1,l-2..]s=[v|v>'+']++m:r|1<3="0"
```
[Try it online!](https://tio.run/##dY5Ra4MwEMff/RRHSlExJ0lFSiXpJ9ie9rCHoCCsqCzJpDonw@/uoqNjLe29JHf8fve/uuzeT1rPM9tY2dUfX2A9477NmxRC/Q4me@R5FJGRZMov/Gydmsm4qWe2TBLiHkcJJn30M7MJ0IYTF4n0o6W1XgXdpAXqk636Gjo6ZCY7C1xDvpv2tenrYBsqjZxq3MVx3kk1TMPR@S7Yses2wshsysaCBFO2zxC0n/1Lf36yEEMVgvJgLcVyCncK8X/H/mh6l39IuxuT9Na5onEsdlGSjhcnpZzuKR5uYq4T0rFIokXcj3i4mJy56@iSmecPTQc5F/n8Aw "Haskell – Try It Online") 
[Answer]
# [Ruby](https://www.ruby-lang.org/), 111 bytes
```
->a{i=a.size;s=a.map{|x|i-=1;"%+d"%x+[?x,"x^#{i}",""][i<=>1]if x!=0}*'';s[0]?s.gsub(/(?<!\d)1(?=x)|^\+/,""):?0}
```
[Try it online!](https://tio.run/##ddDdaoMwFMDx@z6FjZTqcmI9ihRnUx/ERrAfbrkYlEXhbOqzuyPsZuuWixD4/3ICee/PH3OrZ3VsBqubyNnPW@H48Nbch5FGqzQWYiOvYkOyKgkE1f5gJwFCmMoe9BGNbT1a63h62m4LV8WmdNGL68/BLigP69M1xKDUFI71Se74VvhcxtPc6WrlsQXvz@XHS4V/@ndVCGn2aHxFdSLTjBhlgLAHlT/M8TOqU7nAPamcJcb8HCxDf1mfC1uFjPIUIUE2CGh@IC7LwIT3hDNJXJlVF92ay@vyjfe@c15bkZnmLw "Ruby – Try It Online")
Solving this in Ruby turned out to be a bit frustrating, mainly due to the fact that unlike most languages, in Ruby (almost) everything is truthy, including 0-s and empty strings, so that even a simple check for zero becomes nowhere near as short as `x?`. 
I played with various methods of constructing the string, and ultimately settled on a mix of several approaches:
* Terms with 0 coefficients are dropped using a simple conditional
* `+` and `-` signs are produced by formatting syntax with forced sign: `%+d`
* The correct form or `x^i` is selected using rocket operator
indexing `[...][i<=>1]`
* Leading + and unnecessary 1-s are removed by
regex replacements
[Answer]
# [Husk](https://github.com/barbuz/Husk), ~~44 43 41~~ 40 bytes
```
|s0Ψf¤|□ṁ`:'+f¹zμ+↓s²_&ε²¹↑□¹+"x^"s)¹m←ṡ
```
[Try it online!](https://tio.run/##AVoApf9odXNr//98czDOqGbCpHzilqHhuYFgOicrZsK5es68K@KGk3PCsl8mzrXCssK54oaR4pahwrkrInheInMpwrlt4oaQ4bmh////WzEsLTMzLDQsMCwtMSwtMl0 "Husk – Try It Online")
This feels a bit clunky; Husk is not optimized for string manipulation.
I borrowed some ideas from the [Stax answer](https://codegolf.stackexchange.com/a/158271/32014).
## Explanation
```
         Implicit input, say L = [2,-3,0,-1].
         First we compute the exponents.
ṡ        Reversed indices: [4,3,2,1]
m←       Decrement each: [3,2,1,0]
         Then we format the individual terms of the polynomial.
zμ...)¹  Zip with L using two-argument lambda:
          Arguments are coefficient and index, say C = -3 and I = 2.
+"x^"s    Convert I to string and concatenate to "x^": "x^2"
↑□¹       Take first I*I characters (relevant when I = 0 or I = 1): "x^2"
_&ε²¹     Check if abs(C) <= 1 and I != 0, negate; returns -1 if true, 0 if false.
↓s²       Convert C to string and drop that many elements (from the end, since negative).
          Result: "-3"
          The drop is relevant if C = 1 or C = -1.
+         Concatenate: "-3x^2"
         Result of zipping is ["2x^3","-3x^2","x","-1"]
f¹       Keep those where the corresponding element of L is nonzero: ["2x^3","-3x^2","-1"]
         Next we join the terms with + and remove extraneous +s.
ṁ        Map and concatenate
`:'+      appending '+': "2x^3+-3x^2+-1+"
Ψf       Adjacent filter: keep those chars A with right neighbor B
¤|□       where at least one of A or B is alphanumeric: "2x^3-3x^2-1"
|s0      Finally, if the result is empty, return "0" instead.
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 97 bytes
```
{$!=+$_;.map({('+'x?($_&&$++&$_>0)~.substr(--$!&&2>.abs)~(<<''x>>[$!]//'x^'~$!))x?$_}).join||'0'}
```
[Try it online!](https://tio.run/##NY3ZCoJQFEWf8yu8cLgDHs2rWIjTh4iJQkKRKVpgOPy6qdnL3izYQ31tHqe5/Ki0UAN17oEEGqSeUWY17znTWBdxSCkFTaOQhqaYjPadt6@G6zoQSq3QyPJWTNz3GevCMAaSHI@su7AJiBBdBOkojHt1ew4DM9k4e0qbrW/LqlCLqlEOsZngqvh3XaLt7OSgxDPq7gbSXEK4BjZ0bYmWXEii3Ks/l0t5/gI "Perl 6 – Try It Online")
Explanation:
```
$!=+$_;
```
`$!` keeps track of the current exponent.
```
'+'x?($_&&$++&$_>0)
```
Add `+` before positive coefficients, except if it's the first non-zero one. The `$_&&` short circuit makes sure that the anonymous state variable `$` is only incremented for non-zero coefficients. The `&` junction is collapsed when coerced to Bool with `?`.
```
.substr(--$!&&2>.abs)
```
Decrement `$!`. Chop 1 or -1 coefficient unless it's constant.
```
<<''x>>[$!]//'x^'~$!
```
Special-case linear and constant terms. Using the quote-protecting `<< >>` construct is one byte shorter than the equivalent `('','x')` or `2>$!??'x'x$!!!'x^'~$!`.
```
x?$_
```
Hide zero terms, but always evaluate the preceding expression for the `--$!` side effect.
```
||'0'
```
Return `0` if all coefficients are zero.
[Answer]
# Java 8, ~~202~~ ~~176~~ ~~174~~ 173 bytes
```
a->{String r="";int j=a.length;for(int i:a)r+=i==0*j--?"":"+"+i+(j<1?"":j<2?"x":"x^"+j);return r.isEmpty()?"0":r.substring(1).replace("+-","-").replaceAll("(\\D)1x","$1x");}
```
* 26 bytes thanks to *@Nevay*.
**Explanation:**
[Try it online.](https://tio.run/##lVBNT8IwGL7zK940HlrXLusAEcYkJnqUi0fApIyBnaMsXUEI2W/Hd4DeTFjSNnk/nj4fmdopsSlSky2@TkmuyhLelDbHFoA2LrVLlaQwrkuAd2e1WUFCcTKZgWIRtiu8eEqnnE5gDAZiOCnxdLxu25iQCAGQxcrPU7Nyn9FyY@s/QA8Us16s4zi4z4QYETIgHvG0R7OhrKtsGI7IHrv7D@JlLLKp21oD1tfl67pwB8pGJCAD65fbeXnmo5L5Ni1ylE2JJwgngvx1nvOcEjqdvjC5x8kdviyqTtHFQrGd52jh6mS30QtYYxT0YmQyU@waw6F06drfbJ1f4MTlhho/oSb9hnMwx6Bi52huWeWNloXk7W4TSJdL3uOifztCBqiJ11S3Y/ptyUOJEMkboEJkCZuYuUgTnYbqMLSQizbvcNHlD1z0@CMmwuXF56/bf3auNFWrOv0A)
```
a->{                     // Method with String-array parameter and String return-type
  String r="";           //  Result-String, starting empty
  int j=a.length;        //  Power-integer, starting at the size of the input-array
  for(int i:a)           //  Loop over the array
    r+=i==0              //   If the current item is 0
           *j--?         //   (And decrease `j` by 1 at the same time)
        ""               //    Append the result with nothing
       :                 //   Else:
        "+"              //    Append the result with a "+",
        +i               //    and the current item,
        +(j<1?           //    +If `j` is 0:
           ""            //      Append nothing more
          :j<2?          //     Else-if `j` is 1:
           "x"           //      Append "x"
          :              //     Else:
           "x^"+j);      //      Append "x^" and `j`
  return r.isEmpty()?    //  If `r` is still empty
    "0"                  //   Return "0"
   :                     //  Else:
    r.substring(1)       //   Return the result minus the leading "+",
     .replace("+-","-")  //   and change all occurrences of "+-" to "-",
     .replaceAll("(\\D)1x","$1x");}
                         //   and all occurrences of "1x" to "x"
```
[Answer]
# Python, 165 bytes
```
lambda a:"".join([("+"if c>0 and i+1<len(a)else"")+(str(c)if i==0 or abs(c)!=1 else "")+{0:"",1:"x"}.get(i,"x^"+str(i))for i,c in enumerate(a[::-1])if c][::-1])or"0"
```
[Answer]
## PHP, 213 Bytes
```
$p=0;for($i=count($a=array_reverse(explode(',',trim($argv[1],'[]'))))-1;$i>=0;$i--)if(($b=(float)$a[$i])||(!$i&&!$p)){$k=abs($b);echo ($b<0?'-':($p?'+':'')).((($k!=1)||!$i)?$k:'').($i>1?'x^'.$i:($i?'x':''));$p=1;}
```
Command line argument as requested by OP (single argument with brackets and commas).
Pretty print and some explanation:
```
$p = false; /* No part of the polynomial has yet been printed. */
for ($i = count($a = array_reverse(explode(',',trim($argv[1],'[]')))) - 1; $i >= 0; $i--)
{
    $b = (float)$a[$i]; /* Cast to float to avoid -0 and numbers like 1.0 */
    if (($b != 0) or (($i == 0) and !$p)) /* Print, if $b != 0 or the constant if there is no part until here. */
    {
        $k = abs($b);
        echo ($b < 0 ? '-' : ( $p ? '+' : '')); /* Sign. The first sign is suppressed (if $p is false) if $b positive. */
        echo ((($k != 1) || ($i == 0)) ? $k : '');  /* Coefficient */
        echo ($i > 1 ? 'x^' . $i : (($i != 0) ? 'x' : ''));  /* x^3, x^2, x, constant with empty string. */
        $p = true; /* Part of the polynomial has been printed. */
    }
}
```
[Answer]
# PowerShell, 295 bytes
```
$c=$args[0]
$p=$c.length-1
$i=0
$q=""
while($p -ge 0){$t="";$e="";$d=$c[$i];switch($p){0{$t=""}1{$t="x"}Default{$t="x^";$e=$p}}if($d-eq 0){$t=""}elseif($d-eq 1){$t="+$t$e"}elseif($d-eq-1){$t="-$t$e"}elseif($d-lt 0 -or$i -eq 0){$t="$d$t$e"}else{$t="+$d$t$e"}$q+=$t;$i++;$p--}if($q -eq""){$q=0}
$q
```
]