diff options
Diffstat (limited to '2915/CH2/EX2.7/Ex2_7.sce')
-rwxr-xr-x | 2915/CH2/EX2.7/Ex2_7.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/2915/CH2/EX2.7/Ex2_7.sce b/2915/CH2/EX2.7/Ex2_7.sce new file mode 100755 index 000000000..3bfad5c0e --- /dev/null +++ b/2915/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,14 @@ +//Example 2.7
+//To determine solution of a triangle when 3 sides are given
+clc,clear
+
+c=6 //side oposite to vertex C
+a=2 //side opposite to vertex A
+b=3 //side opposite to vertex B
+
+cos_A = (b^2+c^2-a^2)/(2*c*b) //from law of cosines
+printf('cos(A)=%.3f as calculated\n',cos_A)
+printf('But magnitude of cos(A) should always be less than 1. Hence NO SOLUTION exists\n\n')
+
+printf('Note: We observe that a+b < c. But sum of any 2 sides should always exceed third side.')
+printf('\nHence this triangle is impossible.')
|