11.07.2015 Views

Modeling Tools for Environmental Engineers and Scientists

Modeling Tools for Environmental Engineers and Scientists

Modeling Tools for Environmental Engineers and Scientists

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SolutionThe solution can be found by first categorizing the ODE <strong>and</strong> then followingst<strong>and</strong>ard appropriate mathematical calculi. Alternatively, some computersoftware packages can find the analytical solution directly. The two approachesare illustrated in this example.The given equation can be seen as a special case of a first-order nonhomogeneouslinear equation identified earlier, with y = C, x = t, P(x) = 1.23,<strong>and</strong> Q(x) = 2.0. It can, there<strong>for</strong>e, be solved by applying Equation (3.18):Integrating factor = ≡ e ∫P(t)dt ≡ e ∫1.23dt = e 1.23tHence, the solution to ODE is as follows:2 1. 23 {e1.23t } b∫{e 1.23t 2}dt bC = = e 1.23 e1.23tt2= 1. 23 1 1. 232 be –1.23t From the initial condition given, C = 0 at t = 0; there<strong>for</strong>e, b = – 1.223 Thus, the final solution <strong>for</strong> C as a function of t is as follows:C 1.223 {1 – e–1.23t } 1.63{1 – e –1.23t }See Worked Example 3.4 <strong>for</strong> a plot of the above result.As an alternate approach, an equation solver-based software package,Mathematica ® , is used to find the solution directly as shown in Figure 3.9.Here, the built-in procedure, DSolve, is called in line In[1] with the followingarguments: the ODE to be solved, the initial condition, the dependentvariable, <strong>and</strong> the independent variable. The solution is returned in line Out[2],with the integration constant automatically evaluated, by Mathematica ® .Finally, the Plot function is called to plot the solution showing the variationof C with t.It can be seen that the solution returned by Mathematica ® in line Out[2],after some manipulation, is identical to the solution found earlier by followingthe st<strong>and</strong>ard mathematical calculi. This example illustrates just one of thebenefits of such packages in easing the mathematical tasks involved in modeling,enabling modelers to focus more on <strong>for</strong>mulating <strong>and</strong> posing the problemat h<strong>and</strong> in st<strong>and</strong>ard mathematical <strong>for</strong>ms rather than on the oper<strong>and</strong>i ofsolving the <strong>for</strong>mulation.© 2002 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!