using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter8.Section6 { public class Example06 { public Example06() { } private string result; public string Result { get{return result;} } public void Compute() { Science.Mathematics.Function.ToLastType fxy = new Science.Mathematics.Function.ToLastType(dxdy); Science.Mathematics.Function.ToLastType fyz = new Science.Mathematics.Function.ToLastType(dydz); Science.Mathematics.Function.ToLastType fzx = new Science.Mathematics.Function.ToLastType(dzdx); Science.Mathematics.Function.ToLastType ff = new Science.Mathematics.Function.ToLastType(surface); V.Surface s = new V.Surface(ff); s.Parameter1StartValue = 0.0; s.Parameter1EndValue = Math.PI / 2.0; s.Parameter2StartValue = 0.0; s.Parameter2EndValue = 2.0 * Math.PI; V.IntegralOf2Form obj = new V.IntegralOf2Form(fxy, fyz, fzx, s); obj.Compute(); result += obj.Result.ToString() + "\r\n"; result += (Math.PI / 2.0).ToString() + "\r\n"; } private double[] surface(double[] u) { double[] x = new double[3]; x[0] = Math.Sin(u[0]) * Math.Cos(u[1]); x[1] = Math.Sin(u[0]) * Math.Sin(u[1]); x[2] = Math.Cos(u[0]); return x; } private double dxdy(double x, double y, double z) { return z * z; } private double dydz(double x, double y, double z) { return 0.0; } private double dzdx(double x, double y, double z) { return 0.0; } } } /* 1.57082483509655 1.5707963267949 */