Problem Solving in Physical Chemistry Introduction to Mathcad Part 3. Solving Equations R. D. Poshusta Department of Chemistry Washington State University Pullman, WA 99164-4630 poshustr@mail.wsu.edu edited for Mathcad 12 by Theresa Julia Zielinski Monmouth University Department of Chemistry, Medical Technology, and Physics West Long Branch, NJ 07764 tzielins@monmouth.edu © Copyright Theresa Julia Zielinski and Ron D. Poshusta, 2006. All rights reserved. You are welcome to use this document in your own classes but commercial use is not allowed without the permission of the author. Insert a text region containing your Name Save this file to your personal storage device using a suitable file name. A. Numerical solutions of equations can be found using the root and polyroots functions of mathcad. At the right, type the following function: f(x):4*x^2-3*x-1 enter an initial guess for a root x:2 then type r0:root (f(x),x) followed by r0= You should get r0=1 Repeat this with an initial guess of x;0 This hould yield a root = -0.25. The Mathcad function will find the root nearest the initial guess. The initial guess can be varied if need be to find a root. Verify the result by ploitting th e function and determining the roots visually. Plotting is often a convenient way to determine excellent initial guesses for roots A brief explanation of the root function can be found with the f(x) pull-down menu when you select the solving group and search this short list for root or polyroot. Need more information? Use the Mathcad Help B. You can place general functions in the root function. At the right type the following: a:15 b:-3 c=-10 f(x):a*x^2+b*x+c x:0 root(f(x),x)= As mentioned above if the equation has more than one root, Mathcad will find the root nearest to your guess. At the right, find the second root of f(x) by typing x:2 root(f(x),x)= C. If you are unable to guess the approximate root of an expression, try graphing it. At the right, find the root(s) of −x y ( x ) := 10⋅ e See its graph below. −x z := 0 , .1 .. 5 10 −z 10⋅ e − z 0 10 0 2 4 z 6 d. The polyroot function finds all the roots of a polynomial. Here is an example for y(x) = -1-3x+4x 2 . In the space at the right, type vec:<click on matrix buttion in the matrix pallet> <select matrix 3 rows, 1 column, create> and enter the following into the place holders -1 -3 4 Then type r:polyroots(vec) r= If you do this correctly, the roots will be found: -0.25, 1. Save your work to your personal storage medium. Print the worksheet and submit it for grading if directed to do so by your instructor. x := −4 , −3.99 .. 4