using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter4.Section4 { public class Example08 { public Example08() { } private string result; public string Result { get{return result;} } public void Compute() { Science.Mathematics.Function.ToLastType f = new Science.Mathematics.Function.ToLastType(ff); double[] x = { 1.0, 2.0, 3.0 }; V.Curl delcrossf = new V.Curl(f, x); delcrossf.Compute(); result += delcrossf.Result.ToString(); x[0] = 2.0; x[1] = 4.0; x[2] = Math.PI; delcrossf.Compute(); result += delcrossf.Result.ToString(); } private double[] ff(double[] x) { double[] r = new double[3]; r[0] = x[0] * x[1]; r[1] = -Math.Sin(x[2]); r[2] = 1.0; return r; } } } /* (-0.989992496600256,0,-1.00000000000015) (-0.999999999999771,0,-1.9999999999995) */