Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (%i1) s(n) := (2*a + (n-1)*d)*(n/2)$
- (%i2) S1: s(n)$
- (%i3) S2: s(2*n)$
- (%i4) S3: s(3*n)$
- (%i5) expand(S1);
- 2
- d n d n
- (%o5) ---- - --- + a n
- 2 2
- (%i6) expand(S2);
- 2
- (%o6) 2 d n - d n + 2 a n
- (%i7) expand(S3);
- 2
- 9 d n 3 d n
- (%o7) ------ - ----- + 3 a n
- 2 2
- (%i8) expand(S2-S1);
- 2
- 3 d n d n
- (%o8) ------ - --- + a n
- 2 2
- (%i9) expand(3*(S2-S1));
- 2
- 9 d n 3 d n
- (%o9) ------ - ----- + 3 a n
- 2 2
- (%i10) is(equal(s(3*n),3*(s(2*n)-s(n))));
- (%o10) true
- First, we find and expand the value of S1, S2 and S3 in the lines marked %o5, %o6 and %o7.
- Then, in line %o8, we calculate the value of S2 - S1. Then we multiply it with 3 in line %o9.
- Since, the value of %o7 and %o9 is the same, therefore S3=3(S2-S1)
- %o10 is a one line shortcut in Maxima that does the whole thing together.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement