using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter2.Section3 { public class Example04 { public Example04() { } private string result; public string Result { get{return result;} } public void Compute() { Science.Mathematics.Function.ToLastType f = new Science.Mathematics.Function.ToLastType(func); double[] x = new Double[2]; x[0] = 0.0; x[1] = 0.0; V.PartialDerivative obj = new V.PartialDerivative(f, x); obj.WithRespectTo = 0; obj.Compute(); result += obj.Result.ToString() + "\r\n"; obj.WithRespectTo = 1; obj.Compute(); result += obj.Result.ToString() + "\r\n"; } private double func(double[] x) { return Math.Pow(x[0], 1.0 / 3.0) * Math.Pow(x[1], 1.0 / 3.0); } } } /* 0 0 */