Re: How to get the function ?
- To: mathgroup at smc.vnet.net
- Subject: [mg89372] Re: How to get the function ?
- From: Steven Siew <stevensiew2 at gmail.com>
- Date: Sat, 7 Jun 2008 03:00:00 -0400 (EDT)
- References: <g2b4ot$nmg$1@smc.vnet.net>
On Jun 6, 8:50 pm, Joe <Joe.Varghese.J... at gmail.com> wrote: > Now the Qn is to rearrange the first two eq, so that I can find R > directly.. > R = Fn( X1, Y1 ) > > what would be the function.............. > > Thanka a lot... > Joe. Mathematica 5.2 for Students: Microsoft Windows Version Copyright 1988-2005 Wolfram Research, Inc. In[1]:= Out[1]= {stdout} In[2]:= (* Write your mathematica code below *) In[3]:= Off[Solve::verif,Solve::ifun] In[4]:= equation01 = {x2==R Sin[theta2], y2==R(1-Cos[theta2])} Out[4]= {x2 == R Sin[theta2], y2 == R (1 - Cos[theta2])} In[5]:= answer02 = Reduce[x1 == R*Sin[theta1] && R == y1 + R*Cos[theta1] && x1 > 0 && y1 > 0 && Pi/2 > theta1 > 0, R] Pi theta1 Out[5]= 0 < theta1 < -- && x1 > 0 && y1 == x1 Tan[------] && 2 2 theta1 theta1 2 Cot[------] (x1 + x1 Tan[------] ) 2 2 > R == ---------------------------------- 2 In[6]:= equation03 = Select[answer02,MatchQ[#,Equal[y1,__]]&] theta1 Out[6]= y1 == x1 Tan[------] 2 In[7]:= equation04 = Select[answer02,MatchQ[#,Equal[R,__]]&] theta1 theta1 2 Cot[------] (x1 + x1 Tan[------] ) 2 2 Out[7]= R == ---------------------------------- 2 In[8]:= rule04 = Rule @@ equation04 theta1 theta1 2 Cot[------] (x1 + x1 Tan[------] ) 2 2 Out[8]= R -> ---------------------------------- 2 In[9]:= soln05 = Solve[equation03,theta1] y1 Out[9]= {{theta1 -> 2 ArcTan[--]}} x1 In[10]:= soln06 = rule04 /. soln05 2 y1 x1 (x1 + ---) x1 Out[10]= {R -> -------------} 2 y1 In[11]:= equation07 = equation01 /. soln06 2 y1 x1 (x1 + ---) Sin[theta2] x1 Out[11]= {x2 == -------------------------, 2 y1 2 y1 x1 (x1 + ---) (1 - Cos[theta2]) x1 > y2 == -------------------------------} 2 y1 In[12]:= (* End of mathematica code *) In[13]:= Quit[]; What you are looking for is soln05 which talks about theta1 as a function of x1 and y1 soln06 which talks about R as a function of x1 and y1 Steven Siew