Question 1010709
<pre>
{{{s}}}{{{""=""}}}{{{expr(n/2)(2a^""+(n-1)d)}}}

Clear the fraction by multiplying both sides by 2:

{{{2s}}}{{{""=""}}}{{{n(2a^""+(n-1)d)}}}

Swap the d and the (n-1)

{{{2s}}}{{{""=""}}}{{{n(2a^""+d(n-1))}}}

Remove the inner parentheses on the right by distributing:

{{{2s}}}{{{""=""}}}{{{n(2a^""+dn-d)}}}

Remove the remaining parentheses on the right by distributing:

{{{2s}}}{{{""=""}}}{{{2an+dn^2-dn)}}}

Get 0 on the left by subtracting 2s from both sides:

{{{0}}}{{{""=""}}}{{{2an+dn^2-dn-2s)}}}

Swap sides:

{{{2an+dn^2-dn-2s)}}}{{{""=""}}}{{{0}}}

Rearrange the terms in descending order

{{{dn^2+2an-dn-2s)}}}{{{""=""}}}{{{0}}}

Factor n out of the two terms in the middle:

{{{dn^2+n(2a-d)-2s)}}}{{{""=""}}}{{{0}}}

Swap the n and the (2a-d)

{{{dn^2+(2a-d)n-2s)}}}{{{""=""}}}{{{0}}}

We use the quadratic formula.  Since there is 
already a letter "a", we will use capital letters
to avoid conflict of notation:

Ax<sup>2</sup> + Bx + C = 0 has solution

{{{x = (-B +- sqrt( B^2-4*A*C ))/(2*A) }}}

x = n, A = d, B = (2a-d), C = -2s

{{{n = (-(2a-d) +- sqrt( (2a-d)^2-4*(d)*(-2s) ))/(2*(d)) }}}

{{{n = (-2a+d +- sqrt(4a^2-4ad+d^2+8ds))/(2d)}}}

Edwin</pre>