using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter05 { /// /// Example04: A traffic light at rest /// A traffic light weighing 122 N hangs from a cable tied /// to two other cables fastened to a support, as in Figure /// 5.10a. The upper cables make angles of 37^{\circle} and 53^{\circle} /// with the horizontal. These upper cables are not as /// strong as the vertical cable, and will break if the tension /// in them exceeds 100 N. Will the traffic light remain hanging /// in this situation, or will one of the cables break? /// T_1 = 73.4 N, T_2 = 97.4 N. /// public class Example04 { public Example04() { } private string result; public string Result { get{return result;} } public void Compute() { // T1 cos37 - T2 cos53 = 0; // T1 sin37 + T2 sin53 = T3; double[,] mat = { {Math.Cos(37.0*Math.PI/180.0),-Math.Cos(53.0*Math.PI/180.0) }, {Math.Sin(37.0*Math.PI/180.0),Math.Sin(53.0*Math.PI/180.0) } }; double[] vec = { 0.0, 122.0 }; double[] sol = L.Calculus.SolutionOfLinearEquation(mat, vec); result += sol[0].ToString()+" "+sol[1].ToString(); } } } //73.4214328245499 97.4335322257697