Author Topic: Can Pocket CAS show a sequence of iterates ?  (Read 1447 times)

Offline AJH

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Can Pocket CAS show a sequence of iterates ?
« on: June 24, 2010, 04:20:59 PM »
Hi.  I've been using Pocket CAS on an IPad for a few days, and its great - thanks for the app!
I have used the function Newton to solve a non-linear equation.  If possible, I would like to see the iterates (x1, x2, x3,...).
The manual for XCAS suggests this can be done with a table, and typing the x(n) = f(v(n-1) formula, but I cannot see how to get a table in the CAS version on an Ipad.  (alt+t  doesn't seem possible on the keyboard).

I could use Newton repeatedly with 1 iteration, then 2, then 3, but it should be possible to show the successive terms. Any help appreciated.
Alternatively, can I do some sort of iteration  x(n) = f(x(n)) in Pocket CAS ?
THANKS

Offline MrMage

  • Administrator
  • *****
  • Posts: 470
  • Karma: 7
Re: Can Pocket CAS show a sequence of iterates ?
« Reply #1 on: June 24, 2010, 09:14:05 PM »
Hello,

Showing the steps of a Newton iteration is not possible, but you can evaluate custom sequences using the seqsolve() and rsolve() functions.

I'd be glad if you left a review for PocketCAS pro for iPad on the App Store!

Cheers

Daniel


Offline AJH

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: Can Pocket CAS show a sequence of iterates ?
« Reply #2 on: June 27, 2010, 02:00:18 PM »
Many thanks for the fast reply.
If anyone is interested, I have been able to show the iterates in the Newton Raphson method by a simple sequence of commands.
For example, to solve f(x)  =  x - cos(x)  by Newton Raphson, use the steps below (where x:= 1 is a starting value x0)

f(x):= x - cos(x)
g:=Function_diff(f)
x:=1
x:=approx(x-f(x)/g(x))
x:=approx(Ans-f(Ans)/g(Ans))
and repeat the last line for as many iterations as you wish to see.

If you omit the "approx" it shows the results as a sequence of fractions.
Simple iterations could be done in a similar way.