Results 1 to 2 of 2

Math Help - Numerical Differentiation - 2 variables

  1. #1
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1

    Numerical Differentiation - 2 variables

    Hi,
    I have an example where I have a function of 2 variables and I want to calculate the following second derrivative. I can do this example by hand (I think) and evaluate it a point say (2,1).

    f(x,y)=2x^2y+3xy^3


    \frac{{{\partial }^{2}}f(x,y)}{\partial x\partial y}=4x+9{{y}^{2}}

    So at the point(2,1),

    \frac{{{\partial }^{2}}f(2,1)}{\partial x\partial y}=17

    My question is, how do I do the same thing numerically so I can apply it to a more complex function. I have used the methods for a single variable before such as Numerical differentiation - Wikipedia, the free encyclopedia but am confused on how to solve this example numerically?


    Regards Elbarto
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1
    I have found the derivatives wrt to x and y using the central difference formula below:
    Code:
    f=@(x,y)2*x^2*y+3*x*y^3;%function_handle
    h = 1e-10;%step size
    
    xi = 2;%Point to evaluate function
    yi = 1;
    
    % Estimate derrivatives by central difference method
    dfdx = (f(xi+h,yi)-f(xi-h,yi))/(2*h)
    dfdy = (f(xi,yi+h)-f(xi,yi-h))/(2*h)
    Result from after running (MATLAB command prompt)
    Code:
    dfdx =
    
       11.0000
    
    
    dfdy =
    
       26.0000
    
    EDU>>
    Can I use these values to find the value of \frac{{{\partial }^{2}}f(x,y)}{\partial x\partial y} at this point?

    Regards Elbarto
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Numerical Differentiation
    Posted in the Calculus Forum
    Replies: 0
    Last Post: March 9th 2009, 04:10 PM
  2. Numerical Methods: Numerical Differentiation
    Posted in the Calculus Forum
    Replies: 0
    Last Post: February 25th 2009, 03:20 AM
  3. Numerical Differentiation ?
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 20th 2008, 01:37 AM
  4. Numerical Differentiation Formulas
    Posted in the Calculus Forum
    Replies: 8
    Last Post: September 3rd 2008, 09:30 PM
  5. Numerical Differentiation help needed.
    Posted in the Calculus Forum
    Replies: 0
    Last Post: November 20th 2007, 02:38 AM

Search Tags


/mathhelpforum @mathhelpforum