On 11/18/2010 07:32 PM, A. Jorge Garcia wrote:
> My Discrete Math students today came up with an observation: The
> average of any 3 consecutive terms of an arithmetic sequence equals
> the middle term. So, I thought we'd show off some CAS in SAGE (this
> class uses python primarily) and wrote the
On Thu, Nov 18, 2010 at 5:32 PM, A. Jorge Garcia wrote:
> My Discrete Math students today came up with an observation: The
> average of any 3 consecutive terms of an arithmetic sequence equals
> the middle term. So, I thought we'd show off some CAS in SAGE (this
> class uses python primarily) and
Ah, yes, simplify_full(), that's what I forgot! OK, there's a
simplify_radical() too? You learn something new everyday.
HTH,
A. Jorge Garcia
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
Teacher & Professor
Applied Mathematics, Physics & Computer Science
Baldwin Senior
Yes, I should have used assum(a>0), thanx for reminding me!
Also, the var('a,r,n') was a typo, sorry, I was writing this from
memory on my iPod Touch on the commute home
HTH,
A. Jorge Garcia
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
Teacher & Professor
Applied
OK, I had var('a,r,n') already.
I added simplify_radical() and got a teachable moment: "why did we get
sqrt(a**2)==abs(a)?
Then we added assume(a>0) and all was well with the world!
Thanx,
A. Jorge Garcia
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
Teacher & Professor