Print

Print


Hello Johann, hello everybody,

My solution is slower but simpler:

maxterm1(u,n,x,c_,v_):=PROG(
v_:=TERMS(EXPAND(u^n),x),c_:=SUBST(v_,x,1),v_ SUB POSITION(MAX(c_),c_)
)

However, the result of
maxterm1(4*x^3 + 3*x^2 + 2*x + 1,100)

namely

39824366720341062302484823668460396313761926035630933326602206546298515593960~
4195463780443664821745*x^200

is obtained in < 2 seconds.

Best regards,
Valeriu



On 2/6/2007, "Johann Wiesenbauer" <[log in to unmask]> wrote:

>Hi folks,
>
>Now that Josef Boehm is about to reissue the DNL #13, I had a look at R.
>Schorn's problem on page 3, namely to compute the maximal coefficient of
>the polynomial
>
>(4x^3+3x^2+2x+1)^20
>
>Well, that was almost 13 years ago and it took Derive 387.2s then to find
>the answer 8842311087597693745, which turns out to be the coefficient of x^40.
>
>Just to take into account the advances of both Derive and computers since
>then, I would like to increase the exponent to say 100, and pose this as a
>new challenge. (As there are vacations at the universities right now, I
>thought, you might feel like a challenge!) In other words, what is the
>maximal coefficient in the expansion of
>
>(4x^3+3x^2+2x+1)^100
>
>and in which monomial does it occur?
>
>I for my part also got my teeth into this nice problem and just in case you
>want to compare with my solution (in Derive 6.10), you will find it in the
>attachment.
>
>Cheers,
>Johann)