Class Notes (807,457)
United States (312,699)
Chemistry (816)
CHEM 5 (21)

06 Solve,NSolve, FindRoot, Polynomials, Equilibrium, pH.pdf

15 Pages
Unlock Document

University of California - Irvine
Douglas Tobias

LESSON #7 FINDING ROOTS OF POLYNOMIAL EQUATIONS - Finding the roots of equations and systems of equations, such as type that arise in chemi- cal equilibrium and kinetics problems. - There are several commands available for this purpose. The Solve command: Example # 1: In[1]:[email protected] + 1 ã 0, xD Out[1]=x Ø -1<< Example # 2 Applying solve to a generic quadratic polynomial gives the familar quadratic formula: In[2]:=veAa * x + b * x + c ã 0, xE 2 2 -b - b - 4 a c -b + b - 4 a c Out[2]=x Ø >, :x Ø >> 2 a 2 a - You can use the replacement rules to evaluate the roots for a particular choice ofthe coefficients: In[3]:=ts = SolveAa * x + b * x + c ã 0, xE; roots ê. 8a Ø 1, b Ø 3, c Ø 1< 1 1 Out[4]=x Ø I-3 - 5 M>, :x Ø I-3 + 5 M>> 2 2 In[5]:=D Out[5]=x Ø -2.61803, :x Ø I-1 + 13 M>> 2 2 In[12]:=D Out[12]=x Ø -2.30278> 2 µ 21ê3 In[16]:=%D Out[16]=8x Ø 0., :x Ø -2 ProductLogB F>> 2 2 These roots are not very useful In[18]:=ProductLog w [email protected] gives the principal solution for w in z ▯ we . [email protected], zD gives the khsolution. à Printed by Wolfram Mathematica Student Edition 4 Untitled-1 x 2 In[19]:=olveAE ã x , xE NSolve::ifun : Inverse functions are being used by NSolve, so some solutions may not be found; use Reduce for complete solution information. à Out[19]=8x Ø -0.703467, :x Ø -H-1L ProductLogB-1, - 6F >> 3 ‰ 3 ‰ 3 In[25]:[email protected] ã x - 2, xE NSolve::ifun : Inverse functions are being used by NSolve, so some solutions may not be found; use Reduce for complete solution information. à Out[25]=8x Ø 0.135674 + 0. Â, :x Ø I-1 + 33 M, y Ø I3 + 33 M>> 2 2 2 2 In[35]:=%D Out[35]=8x Ø -3.37228, y Ø -1.37228> b d - a e b d - a e CHEMICAL EXAMPLES The solutions of polynomial equations is routinely encountered int eh analysis of chemical equilibra. Below we consider several examples Example #1: EQUILIBRIUM Consider the steam reforming of methane reaction, which is an industrial proess used to produce hydrogen gas: CH 4HgL+ H 2 HgLFCO HgL+ 3H 2HgL -7 The equilibrium constatn for this reaction is 1.8 x 10 at 600K. Gaseous methane, water, and carbon monoxide are introduced at partial pressures of 1.40 atm, 2.30 atm, respectively, into a reaction vessel at 600K. Determine the partial pressures fo all species at equilibrium. The law of mass action for this reaction is: 3 K = PCOP H2 PCH4PH2O The Following table is used to derive an equaiton that can be solved to determine the equilibrium partial pressures of the species present: Printed by Wolfram Mathematica Student Edition Untitled-1 7 In[39]:=ble = 881.40, 2.30, 1.6, 0> k a w kw= @H [email protected] D = 1.0*10 -14 We therefore draw up the follwing table In[57]:[email protected], tableD; table = 881.000, 0, 0
More Less

Related notes for CHEM 5

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.