Re: A question on Newton's Method
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Sun, 03 Apr 2005 20:02:03 +0100
James Van Buskirk wrote:
> "Jon Harrop" <usenet@xxxxxxxxxxxxxx> wrote in message
> news:42500867$0$63445$ed2e19e4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> What is Lisp-like about Mathematica and OCaml?
>
> They are equally incomprehensible.
Really? Have you considered the Fortran equivalent of my numerical analysis
example? How about some other examples? Can you design a single example of
numerical analysis which is more comprehensible in Fortran?
>> Yes it does:
>
>> In[1]:= f[x_] = x^3 - x - 1
>
>> Out[1]= -1 - x + x^3
>
>> In[2]:= D[f[x], x]
>
>> Out[2]= -1 + 3 x^2
>
> No, the right context is:
>
> f[x_] := x^3-x-1
> fp[x_] := D[f[x],x]
> Plot[fp,{x,-1,2}]
>
> Which, unless they changed Mathematica recently, doesn't
> do anything useful.
Of course not, it's wrong.
Firstly, there's no point in defining fp[x] when you can just use f'[x].
Secondly, you need to give the plot function an expression to plot, not a
function. So you want:
Plot[f'[x], {x, -1, 2}]
which works perfectly.
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com
.
- Follow-Ups:
- Re: A question on Newton's Method
- From: James Van Buskirk
- Re: A question on Newton's Method
- References:
- A question on Newton's Method
- From: David M
- Re: A question on Newton's Method
- From: Jon Harrop
- Re: A question on Newton's Method
- From: beliavsky
- Re: A question on Newton's Method
- From: James Van Buskirk
- Re: A question on Newton's Method
- From: Roman Werpachowski
- Re: A question on Newton's Method
- From: Jon Harrop
- Re: A question on Newton's Method
- From: James Van Buskirk
- A question on Newton's Method
- Prev by Date: Re: General complete elliptic integral
- Next by Date: Re: A question on Newton's Method
- Previous by thread: Re: A question on Newton's Method
- Next by thread: Re: A question on Newton's Method
- Index(es):
Relevant Pages
|