Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider this image of two weights hanging from a rigid bar. Bi un on T2 L2 This is a static picture, nothing is moving. Can
Consider this image of two weights hanging from a rigid bar. Bi un on T2 L2 This is a static picture, nothing is moving. Can you find the three tensions in the string, T1, T2, and T3? Looking at the image on the right, we see we will need to find the angles that all the strings make with respect to the horizontal (the bar is assumed to be horizontal). If we assume that the strings start and end at the same height, the constraints due to geometry alone are the following: L cos 0 + L2 cos 02 + L3 cos 03 = L Li sin + L2 sin 02 - L3 sin 03 = 0 sin? 0 + cos2 0 = 1 sin? 02 + cos2 02 = 1 sin-03 + cos 03 = 1 The last three are trigonometric identities and normally would not need to be there. However, I want to treat cos 0 and sin 0 as independant variables to find, so I need more independant equations. Sum of the forces on each weight should add to zero, and gives these equations; Ti sin 0 - 72 sin 02 - W = 0 Ti cos 01 T2 cos 02 = 0 72 sin 02 + T3 sin 03 - W2 = 0 T2 cos 02 - T3 cos 03 = 0 Now put the unknowns as a vector: sino sin 02 cos 02 cos 03 Now the nine equations above can be written as vector of nine functions. Just substitute the definition of x; into the equations, and move any non-zero right side to the left side. fi(x0), ..., xg) = 0, i = 0,8 fo() fi) 12(*) 13(6) 546) (5 ) 16) 57 ) f8()) F(X) = 1. In a new markdown cell, write out the 9 new functions in term of Ti, 0; and xi. (Use this cell as a guide to how to enter LateX code.) 2. Compute the Jacobian matrix, don't write it here, but do include it in your program. Most of the elements are zero. Only 28 are not zero. 3. Use the following values and compute the vector using scipy.optimize.root. Use both a Jacobian solver like Im and a non-Jacobian solver like krylov constants = (10.0, # W1 20.0, # W2 3.0, # L1 4.0, # L2 4.0, # L3 8.0) # L 4. From the results, print out the number of times the function and Jacobian were used by the solver. This may be either in the variables res.nfev & res.njev or in the variable res.nit, depending on the solver method. Here's a helper to get you started def f(x, *args) : W1, W2, L1, L2, L3, L = args x1,x2,3,4,5,6,x7,x8,x9 = x f1 = L1*x4 + L2*x5 + L3*x6 - L ... more goes here... return numpy.array([f1, f2, f3, 44, 45, 46, f7,68,79]) Consider this image of two weights hanging from a rigid bar. Bi un on T2 L2 This is a static picture, nothing is moving. Can you find the three tensions in the string, T1, T2, and T3? Looking at the image on the right, we see we will need to find the angles that all the strings make with respect to the horizontal (the bar is assumed to be horizontal). If we assume that the strings start and end at the same height, the constraints due to geometry alone are the following: L cos 0 + L2 cos 02 + L3 cos 03 = L Li sin + L2 sin 02 - L3 sin 03 = 0 sin? 0 + cos2 0 = 1 sin? 02 + cos2 02 = 1 sin-03 + cos 03 = 1 The last three are trigonometric identities and normally would not need to be there. However, I want to treat cos 0 and sin 0 as independant variables to find, so I need more independant equations. Sum of the forces on each weight should add to zero, and gives these equations; Ti sin 0 - 72 sin 02 - W = 0 Ti cos 01 T2 cos 02 = 0 72 sin 02 + T3 sin 03 - W2 = 0 T2 cos 02 - T3 cos 03 = 0 Now put the unknowns as a vector: sino sin 02 cos 02 cos 03 Now the nine equations above can be written as vector of nine functions. Just substitute the definition of x; into the equations, and move any non-zero right side to the left side. fi(x0), ..., xg) = 0, i = 0,8 fo() fi) 12(*) 13(6) 546) (5 ) 16) 57 ) f8()) F(X) = 1. In a new markdown cell, write out the 9 new functions in term of Ti, 0; and xi. (Use this cell as a guide to how to enter LateX code.) 2. Compute the Jacobian matrix, don't write it here, but do include it in your program. Most of the elements are zero. Only 28 are not zero. 3. Use the following values and compute the vector using scipy.optimize.root. Use both a Jacobian solver like Im and a non-Jacobian solver like krylov constants = (10.0, # W1 20.0, # W2 3.0, # L1 4.0, # L2 4.0, # L3 8.0) # L 4. From the results, print out the number of times the function and Jacobian were used by the solver. This may be either in the variables res.nfev & res.njev or in the variable res.nit, depending on the solver method. Here's a helper to get you started def f(x, *args) : W1, W2, L1, L2, L3, L = args x1,x2,3,4,5,6,x7,x8,x9 = x f1 = L1*x4 + L2*x5 + L3*x6 - L ... more goes here... return numpy.array([f1, f2, f3, 44, 45, 46, f7,68,79])
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started