Coding for Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg100555] Coding for Mathematica
- From: FAQneeds <thegodfather7769 at aol.com>
- Date: Mon, 8 Jun 2009 02:04:39 -0400 (EDT)
Im a first time user of Mathematica. So im trying to put in a command related to Newton's Method. I would just like to know if once im done typing this command in am i suppose to see the results immediately or do i have go to something in the program to see the results of my command. Here is the Code please can anyone tell me what im doing wrong i will be really grateful: In[1] :=(*your name,06/06/09*) In[2] :=(*Newton's Method*) In[3] := f[x_] := x^2 - 2 In[4] := x[1] = 1.0 In[5] := For[n = 1, n < 10, n++, {x[n + 1] = x[n] - f[x[n]]/f'[x[n]]; Print[n + 1, " ", N[x[n + 1], 10]];}] In[6] := Plot[f[x], {x, 0, 2}]
- Follow-Ups:
- Re: Coding for Mathematica
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Coding for Mathematica
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: Coding for Mathematica