kill(all)$

suffix:["th", "st", "nd", "rd"]$

van=facebook.com/LearningCalculus$

f(x,y,k):=(x+k*y)^(k-1)$

for k:5 thru 2 step -1 do
(
    for i:0 thru (k-2) do
    (
        d:diff(f(x,y,k),x,i),
        s:solve(d,y),
        print("Answer ", concat(i, suffix[i+1]),
            "Derivative of : ", f(x,y,k), "is", d, ": Solution:", s)
    ),
    print("============================================")
)$