The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: second derivative
Replies: 5   Last Post: Feb 12, 2013 2:16 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 14
Registered: 5/20/09
Re: second derivative
Posted: Feb 12, 2013 11:07 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"aasim Azooz" <> wrote in message <g2483i$bfa$>...
> if y=f(x) then the first derivative is
> y1=diff(y)./diff(x)
> The second derivative is
> y2=diff(y1)./diff(x)
> don't forget that the size of y1 is less than the size of y
> by one and the size of y2 is less than the size of y by two
> Aasim Azooz


I just looked into computing an approximate second derivative with Matlab and found the answer given by Aasim (above).

However, shouldn't it rather be:
y2=diff(y1)./diff(x^2) ?

The answer Aasim gave comes up repeatedly (in similar form) in my web searches, hence I am not sure whether I am making a conceptual error here...
My x values are equally spaced, in case that makes a difference.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.