using System; using L=Science.Physics.GeneralPhysics; using M = Science.Mathematics.Calculus; namespace Serway.Chapter01 { /// /// Example03: Analysis of a power law /// Suppose we are told that the acceleration a of /// a particle moving with uniform speed v in a circle of radius /// r is proportional to some power of r, say r^n, and some power /// of v, say v^m. Determine the values of n and m and write the /// simplest form of an equation for the acceleration. /// public class Example03 { public Example03() { } private string result; public string Result { get{return result;} } public void Compute() { L.Acceleration a = new L.Acceleration(); L.Velocity v = new L.Velocity(); L.Length r = new L.Length(); M.LinearEquation eq = new M.LinearEquation(); double[,] mat = {{v.DimensionLength, r.DimensionLength}, {v.DimensionTime, r.DimensionTime}}; double[] vec = { a.DimensionLength, a.DimensionTime }; eq.Matrix = mat; eq.Vector = vec; eq.Solve(); result = Convert.ToString(eq.Solution[0])+" "+ Convert.ToString(eq.Solution[1]); } } }