Andi710

40 Reputation

2 Badges

19 years, 70 days

MaplePrimes Activity


These are answers submitted by Andi710

Sorry, this was a typo (wanted to split the entire formula for better readability). So here is the complete one that should make more sense:

D_n := n_max+1-n_0;
N2:='sum((2*u2-D_n)!/(u2!*(u2-D_n)!),u2=D_n..min(u,n_max-1))';
N:='sum((n_0-2+u)!/(u!*(n_0-2)!)-piecewise(u<D_n,0,N2),u=0..n_P-2)';
eval(N,{n_0=3,n_P=4,n_max=4});

The result should be 5 (6 for the first part, 1 for the inner sum with the piecewise function). When I do the inner sum step by step, it works well:

eval(piecewise(u<D_n,0,N2),{n_0=3,n_P=4,n_max=4,u=0});
eval(piecewise(u<D_n,0,N2),{n_0=3,n_P=4,n_max=4,u=1});
eval(piecewise(u<D_n,0,N2),{n_0=3,n_P=4,n_max=4,u=2});

gives 0,0, and 1. Sums up to 1, just as expected. Put it into a sum and you get 'undefined'. No idea why.

Using Sum() instead of 'sum()' makes no difference.

--
Andreas Ludwig
PhD candidate
Simon Fraser University
Andreas-Ludwig.info

Unfortunately, the forum interpreted some '<=' operators as HTML tags :-/. As it is, the testcase doesn't make a lot of sense. It was intended to be (now in plain text): F1:=y=piecewise(x>=0 and x<=50, 200-2*x, x>50 and x<=150, 150-x); And again, solve(F1, x); doesn't bring anything else than 'Warning, solutions may have been lost'
Page 1 of 1