Student Support Forum: 'Equation System' topicStudent Support Forum > General > "Equation System"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response Peter Pein 04/02/13 4:09pm Hi, the following will define a function that returns all values of q for given parameters: calcq[l1_, l2_, d1_, d2_, h1_, h2_] := Block[{q, q1, q2}, q /. Solve[ {h1 == 31/12500 (((l1 + l2) q^2)/(d1 + d2)^5 + (l1 q1^2)/d1^5), h2 == 31 /12500 (((l1 + l2) q^2)/(d1 + d2)^5 + (l2 q2^2)/d2^5), q == q1 + q2}, q, {q1, q2}]] means : given parameters l1,l2,..,h2 calculate the values of q that solve the three equations while eliminating q1 and q2 calcq[500, 300, 15/100, 1/10, 25, 30] // Simplify {-(25/32) Sqrt[(15 (15205433 - 54000 Sqrt[47591]))/89426826199], 25/32 Sqrt[(15 (15205433 - 54000 Sqrt[47591]))/89426826199], -(25/32) Sqrt[(15 (15205433 + 54000 Sqrt[47591]))/89426826199], 25/32 Sqrt[(15 (15205433 + 54000 Sqrt[47591]))/89426826199]} get the approximate values: N[%, 16] {-0.01872581690517561, 0.01872581690517561, -0.05256162970072469, 0.05256162970072469} Peter P.S.: try for example: Plot[calcq[x1, 800 - x1, 15/100, 1/10, 25, 30] // Evaluate, {x1, 0, 800}] URL: ,

 Subject (listing for 'Equation System') Author Date Posted Equation System Marc 04/02/13 07:26am Re: Equation System jf 04/02/13 10:23am Re: Equation System Bill Simpson 04/02/13 11:52am Re: Equation System Peter Pein 04/02/13 4:09pm Re: Equation System Marc 04/03/13 02:15am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic