New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Quantitive Methods in Hydro

by: Dr. Wendell Schuppe

Quantitive Methods in Hydro HYD 510

Dr. Wendell Schuppe

GPA 3.72


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Environmental Science & Engineering

This 68 page Class Notes was uploaded by Dr. Wendell Schuppe on Thursday October 15, 2015. The Class Notes belongs to HYD 510 at New Mexico Institute of Mining and Technology taught by Staff in Fall. Since its upload, it has received 32 views. For similar materials see /class/223633/hyd-510-new-mexico-institute-of-mining-and-technology in Environmental Science & Engineering at New Mexico Institute of Mining and Technology.

Popular in Environmental Science & Engineering


Reviews for Quantitive Methods in Hydro


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/15/15
New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology Hydrology 510 Quantitative Methods in Hydrology Motive Preview Example of a function and its limits Consider the solute concentration C ML393 in a con ned aquifer downstream of a continuous source of solute with xed concentration C0 starting at time F0 Assume that the solute advects in the aquifer while diffusing into the bounding aquitards above and below but which themselves have no signi cant ow A homology to this problem would be solute movement in a fracture aquifer advection controlled diffusion controlled gt x with diffusion into the porousmatrix walls bounding the fracture the socalled matrix diffusion problem The difference with the original problem is one of spatial scale An approximate solution for this conceptual model describing the spacetime variation of concentration in the aquifer is the function x x D 12 C x D C x t c fc i r E e i ivmwl where t is time T since the solute was rst emitted x is the longitudinal distance L downstream v is the longitudinal groundwater seepage velocity L T in the aquifer D is the effective molecular diffusion coef cient in the aquitard Lz T B is the aquifer thickness L and erfc is the complementary error function Describe the behavior of this function Pick some typical numbers for DB2 e g D N 10399 m2 s39l typical for many solutes and B 2m and v eg 01 m d39l and graph the function vs time at a one more locations x and vs space at one or more times t Later we ll examine derivatives and integrals of this function and its parent which includes details of concentrations in the aquitard And later still we ll look at its origin through solutions of PDEs 1 vll F2008 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Review of calculus This is review material taken and expanded from Carol Ash and Robert B Ash The Calculus Tutoring Book IEEE Press New York 1986 Functions Introduction to functions A function can be thought of as an inputoutput machine Given a particular input x the lnction fx is the corresponding output Functions are usually denoted by single letters We ll often used f and g in this review to denote functions If the function g produces the output 3 when the input is 2 we write g23 Mathematicians represent this process by a mapping table or diagram as shown here TABLE MAPPING DIAGRAM Input Output 2 3 2 0 3 8 4 8 H 4 9 4 9 k9gt 10 l 10 00 l In hydrology the machine can represent a model of a process Then for example x could be location in an aquifer and x spatially variable hydraulic conductivity as a function of location Or for stream ow x could be time and x stream discharge as a function of time at a stream gauge location Or x could be a state such as pressure or temperature and x a statedependent property such as uid density or Viscosity which are functions of pressure or temperature this is called an equation of state or EOS We often consider forcings as an input x such as precipitation or solar radiation For precipitation over a watershed as in input stream ow at the outlet is a typical output while for radiation over a landsurface plot as an input evapotranspiration from that plot back to the atmosphere is a typical output Inputs can be properties or parameters location time or forcings Outputs can be states uxes other properties or parameters location or travel residence or arrival times Mb Machine or Model f mix The input x is called an independent variable while the output x is a called a dependent variable1 Mathematicians say that fmaps x to x and call x the value of the function at x The set of inputs x is called the domain of f and the set of outputs is called the range 1 In this review of calculus we assume one input and one output Later we ll extend the review to multivariate calculus with more that one input and often more than one output In hydrologic applications the multivariate case is the norm 2 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Formally a function fx is not allowed to send one input to more than one output 0 lt Not a function 0 Consider the domain of x between the limits a and b The set of all x such that a 5 x 5 b is denoted by mathematicians by ab and is called a closed interval The set of all x such that a lt x lt b is denoted by mathematicians by ab and is called an open interval Similarly we use a b for the set ofx where a 5x lt b ab for a lt x 5 b aoo forx 2 a and ooa forx 5 a and 00 a forx lt a In general the square bracket and the solid dot in the gure below means that the endpoint belongs to the set a parentheses and the small circle in thefzgure means that the end point does not belong to the set The notation oooo refers to the set of all real numbers 0 C O 3 O a b a b a 00 00 b Issues to review on your own Equations V functions Onetoone functions Increasing and decreasing functions Elementary functions all of which are common functions in hydrology also see the elfun directory in Matlab Type Examples Constant function fx 2 for all x gx 7r for all x Power function x39l x0995 x x2 x x12 Trigonometric functions sine cosine tangent secant Inverse trigonometric sin391 x 005391 x tan391 x Functions Exponential functions 2 l439x 104 and especially ex where e 271828 Logarithmic functions logz x log10 x and especially loge x In x Trigonometric functions Commonly encountered in e g New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology pr0b1ems with periodic forcing e g diurnal seasonal decadal cy1indrica1 and spherical coordinates e g radial well hydraulics intraparticle spherical diffusion and adsorption ge0metric de nition of object shapes certain nite spatial domain problems e g Fourier series solutions De nitions of sine cosine and tangent sint9l cost9 tant9l 8mg 1 r r x cost9 where x y Cartesian coordinates r radial coordinates Radius r is always positive but the signs of x and y depend on the quadrant thus the signs of the trig functions also depend on quadrant y x sign of sin 9 sign of cos 9 sign 0ftan 9 Degrees V radians We measure angles in both degrees and radians Recall that an angle 9 of 1800 71 radians More generally number of radians 7239 2 2 number of degrees 180 Examples of important angle and related trig functions 2 The equation numbers refer to the numbers in Ash and Ash 1986 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology We prefer to use radians and in some cases we must use radians such as r measuring the arc length along a circle Let 3 equal the arc length a A fraction of the circumference The circumference is 2m therefore the E len h is s 9 r 5 where 9 is in radians Reference angle Trig tables list sin 0 cos 0 tan 9 for 00 lt 9 lt90 To nd trig functions for other angles use signs given in the box above plus reference angles For example if 9 is in the second quadrant upper left quadrant then the reference angle is 1800 0 In particular if 9 is 1500 then the reference angle is 30 Etc Right angle trigonometry 39 39 h otenuse Sin 6 opposne leg COS 6 2 adjacent leg 6215b YP Oppos e hypotenuse hypotenuse 39 I tang opposne leg 60 d adjacent leg 3 Jacem Graphs of sin x cos x and tan x Exercise Use Matlab to graph these three functions from x 471 to 471 Graphs of a sinbx c You should be familiar with defns of amplitude a period 271 b frequency b and phase lag c for example the phase lag describes a shift in radians of the peak applications to gt harmonic motion gt earth and ocean tides gt approximations to diurnal seasonal and other periodic temporal signals applications temperature evapotranspiration spring discharge Application A monitoring well on Cape Cod Massachusetts located 700m from the Atlantic Ocean coast observes that water table elevations uctuate over time The water level data is t to the model a sinbx c where a is the amplitude onehalf the total range of the water level uctuation the period is 12 hours x is time in hours and the observed phase lag is 3 hours compared to the local ocean tide where for a lag of 3 hours 0 is expressed in radians 712 The ratio of tidal amplitude in the well to that in the local ocean and the phase lag are compared to a model of aquifer response to a tidal forcing in order to estimate the aquifer parameters hydraulic conductivity and speci c yield Similar calculations are performed for other periodic forcings like earth tides and uctuating stream stage New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Graphs of gxfx sin x If you need to sketch the function gx by hand you would rst sketch the curve yf x and the curve y f x its re ection in the x axis to serve as an envelope Then change the amplitude of the sine curve with x so that it just ts within the envelop In addition re ect the sine curve in the x axis whenever f x is negative Exercise Use Matlab to graph the function g for x explxl from x 471 to 471 Application con t The model of aquifer response to tidal forcing mentioned in the previous box yields a different solution for each distance 5 from the ocean That is the water level response is 615 sinbx 05 where the amplitude at and the phase lag c depend on location relative to the ocean Wells that are closer to the ocean have larger amplitude and smaller phase lag For example the amplitude decreases exponentially with distance 615 cx exp 5 Secant cosecant and cotangent 7 sect9 1 csct9 1 cot6csg cost9 Slnt9 tant9 Slnt9 or for a right triangle hypotenuse hypotenuse sec 9 csc t9 8ab adjacent leg opposne leg cote 2 adjacent leg 80 opposne leg z z z z Notatlon Issues It IS common practlce t0 wr1te Sln x for 111 x and 111 x to mean Slnx etc Standard trigonometric identities Below are a few examples of common identities They illustrate the various categories of identities See standard math tables eg as referenced on next page for complete list 9 Negative angle formulas Isin x sin x cos x cos xl That is sine is an odd function and cosine is an even function 10 Additionformulas sinx y sinx cos y cos xsiny l 1 Double angleformulas New Mexico Tech HdelU Hydrology Program Quantitative Methods in Hydrology sin2x 2 sin x cosx tan2x 2 an x 17 tan2 x 12 Pytha orean identities 13 Halfangleformulas sin 1 717cosx COS i 71cosx 2 2 14 Product formulas Sinx cosy 7 sinx y 2 sinxr y 15 Factoringformulas x7 y sin X sinxsiny2cos 2y 16 Reduction formulas cos 76 sinH 2 17 Law ofSines B sinA 7 sin 7 sinC a b c C 18 Law ofCoriner A b c2 azb2 7 lab cosC 1 9 Area formula Area oftriangle ABC ab sin C Reference re Math Tables Standard reference on algebra calculus and matrix methods and ODEs but no PDEs R Standar Ma emafic T es and Formulae 31st Edmon ZWillinger D CRC Press Boca Raton FL 2003 or later edition see www crcnre mm for latest edition Important note this class and all your subsequent hydrology classes assume that you have your own copy of this or another standard math tables and know how to use it New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Inverse functions and inverse trig functions f The inverse function Given a onetoone function a b that maps a to b a b 7 1 Then a 7 f b 1s 1ts 1nverse that maps b to a fl Example A partial table for f x 3x and its inverse f 391x x 3 x x x 6 2 15 5 21 7 Exercise Use Matlab to graph f x and f 391x for this example over the domain IS x 25 on the same plot The graph of f 1x One of the advantages of an inverse function is that its properties such as its graph often follow easily from the properties of the original function Comparing graphs of f x and f 391x amounts to comparing points such as 26 and 62 in the example above The points are re ections of one another in the line y x so that the pair of graphs is symmetric with respect to the line Exercise If f x x2 and x 2 0 so that f is onetoone then f 391x x Use Matlab to graph f x and f391x for this new example over the domain 0 S x S 12 on the same plot Also on the plot include the straight line yx as a dashed line Common inverses of trig functions are The inverse sine function Sin1 x or arcsin x 1 The 1nverse cosme functlon cos x or arccos x The inverse tangent function tan391 x or arctan x Exponential and logarithmic functions Exponential functions Examples 2 l2x 7 contrast these with power functions like x2 x x 397 Note that negative bases eg 4x can be a problem Be careful Try to avoid Exercise Use Matlab to plot example graphs of f x 3x 2X and l2x over the domain 3 x 33 Do this in two plots First use a linear plot and then a semilog plot lnfx v x New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Most popular bases Computer science uses base 2 We ll visit this in lab Algebra and much of science favors base 10 Calculus ODEs and PDEs favors base e Powers and roots examples fay a My abY cfle a W xVa a 1 ifaiO a aya y Maw a lf JY W Wab We gtlt Wb The exponential function ex exp x and especially e39x exp x e is an irrational number between 271 and 272 271828 with a particular defn in terms of a derivative to be given laterelsewhere e or exp is known as The Exponential Function Graph of exp x gt exp x is de ned for all x gt exp x gt 0 in fact the range of exp x is 000 gt exp x is an increasing function Exercise Use Matlab to plot exp x and compare to graphs of 2x and 3x for the domain 3 x 33 Exercise Use Matlab to graph e39x exp 7x lexp x for the domain OS x 32 Compare on the same plot to Matlab graphs of 1 2X x39I x392 Application It is common to nd hydrologic systems that respond exponentially in time t The response function has the form expkt where k is a rate coef cient per unit time and k39l which has units of time is sometimes called the time constant Notice this function decreases in time Example applications include radioactive decay rst order biotransformation of organic contaminants and discharge from a lake or manmade surface impoundment The natural log function In x loge x In x is the inverse ofex ie ln ex x Inabonlyifeba since e0 1 and e1 e then lnl0andlnel New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Graphs of In x gt In x is de ned for x gt 0 you cannot take the logarithm of a negative number or zero gt The range of In x is oooo gt In x is negative if0 lt x lt l and positive ifx gt 1 gt In x is increasing Exercise Use Matlab to graph In x for the domain 0 S x 33 Exercise Use Matlab to graph both In x and its inverse ex on the same plot for the domain 3 x 33 Also include on the plot the straight line yx as a dashed line The pair of graphs should be symmetric with respect to the dashed line Note that the function In x is unde ned for x S 0 Application Pumping water from an aquifer results in drawdown of hydraulic head After a while the time behavior of drawdown in an observation well is approximated by a logarithmic function of the form ln t where is a coef cient per unit time that depends on aquifer properties and distance away from the pumping Laws of exponents and logarithms ex ey ex W ex ey exquotv e39x lex ex e lnab lnalnb 1n 2 In a ln b b 1 1n 3 lnb s1nce ln1 0 lnab lnab b lna Logaritth with other bases especially bases 2 and 10 logzx is the inverse of 2X loglox is the inverse of 10x Solving equations and inequalities involving ex and In x To solve the equation ex 7 take ln ofboth sides and use In ex x to get x 1n 7 To solve the equation In x 6 take exp of both sides and use expln x x to get x e396 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Solving inequalities involving ex and In x requires care but takes advantage of both ex and In x being increasing functions Combinations eg sums products compositions of elementary functions are elementary functions z z Examples x x x sm x lsmx Solving equations and inequalities involving elementary functions Review how to use algebra including factorization and zero finding exercising special caution for inequalities such as x gt 0 when the functions are not increasing Example Solve the equation 4 ln 2x 5 8 Solution In 2x 5 84 2 divide by 4 2x 5 exp2 take exp 2x e2 5 subtract 5 x 12e2 5 divide by 2 Consider the example in the sketch below The function f is zero at x2 and 2 These two points both satisfy the equation x 0 That is there are two solutions to this equation we say that the fis positive x 5 f is negative solution for the independent variable x is non unique Exercise Pick another value of f and nd the soluti0ns for x x2 E gt f 0 07 x7 2 Notice that to the left ofx2 the function is positive as it is between x 2 and up to 4 At x 4 and to its right the function is negative If we seek a solution to the inequality x 2 0 the solution is x S 2 m 2 Ex lt 4 The solution to x lt 0 is 2 ltx lt 2 w x2 4 There are some suggested guidelines for solving inequalities Illustrated by the sketch these will be useful later New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Step 1 Find the values of x where f is discontinuous as at x4 in the sketch For an elementary function these typically occur where f is not defined in practice because of a zero in the denominator as at x0 for the functionlx Step 2 Find the values of x where f is zero as at xi2 in the sketch that is solve the equation x0 Step 3 Look at the open intervals in between On each of these intervals f maintains only one sign To nd the sign you can test one number for each interval Exercise Decide where the function f x l x l is positive and where it is negative Then plot in Matlab3 Applications There are many applications in hydrology seeking the solution to an inequality Where are contaminant concentrations greater than an MCL regulated maximum contaminant level At what times during a storm do water levels exceed ood stage Does the suction negative pressure head in a soil the wilting point of vegetation Some applications involve the design or operation of facilities These often lead to inequalities referred to as constraints Well pumping rates are often constrained by the amount of drawdown they cause Stream ow releases from dams are constrained by their impact on downstream aquatic life and geomorphology Graphs of translations reflections expansions and sums In many applications it is useful to understand how the graphs of a function change under transformations mainly horizontal translations in x horizontal and vertical expansions and sum or superposition of functions Re ections are also encountered You perform many of these operations when you use a drawing program like Adobe Illustrator or the drawing features in MSWord In the following examples consider the function yfx then transform it In the rst two examples an operation is performed on the variable x In the next two the operation is performed on the function ie on the entire right side The fifth example is a composite operation Horizontal translation yfx 3 to translate shift the graph otherwise unchanged along the x axis three units to the right Example This is precisely what happens when a solute plume in a river advects downstream without mixing where x is location along the river and the product of stream velocity and time equals 3 in the same distance units as x Horizontal expansion yf 2 doubles the x coordinates of the graph so as to expand the graph since it doubles all parts of the graph it also shifts it to the right 3 You may think Why don t I just plot in Matlab first and not try to figure this out in my head at all The trouble is that Matlab and other programs can be fooled It is a good idea to have a notion for what a function looks like before trusting a program to plot it Besides it helps to improve your reasoning ability and understanding 12 New Mexico Tech Hyd Hydro1ogy Program Quantitative Methods in Hydrology Vertical contraction yl2fx contracts the y value by a factor of 2 Vertical re ection y fx refects the graph in the xaxis xample Suppose yfx represents aquifer drawdown at locationx due to a pumping well Then y x represents the negative drawdown or drawup if the well were used to inject water instead of pump it at the same rate 1 t L t 1 1 h L t 1 1 m 1 w h r r 1 x Wavk in 2 2 pvogvessu 1 tL 11L 1 t L 1 1 1 39t 39 quot F t F chuck our man r h tL t F tL L39R AL tL I 39 1 quot tL rm 1 1 1 r 1 rL r 1 r 1 1 1 y L rL 1 L r t r L 1 1 1 t tL r Warning re x 1 v x 7 l The rst of these involves a translation of 1 unit to the right The second translates the graph down Graph of x gx simply add the heights of the respective functions Use Matlab to plot sinx cos x and their sum over the domain F 47r to 471 Some more advanced functions We encounter a large family of more advanced functions in hydrology Three of the most common advanced functions are mentioned here Advanced functions can sometimes be found in standard math tables while the best reference for them is the more advanced and highly cited Abramowitz and Stegun Handbook Mathematical Functions Dover Press New York 1964 This handbook was originally published by the US National Bureau of Standards now call NIST National Institute of Standards and Technology NIST is currently organizing a webbased successor to the NBS Handbook called the Digital Library of Mathematical Functions DLMF The web site for this uncompleted project is httpdlmfnistgov Advanced functions can also be found in Matlab see the 1 d39 t Man a and quot 39 39 f but Abramowitz and Stegun remains the main reference We ll use the routines in Matlab from the mec m directory for the functions below Error Function erfx and Complementary Error Function erfc x l 7 erfx are commonly encountered in groundwater ow solute transport and heat transport as a solution to 4 a parabolic partial differential diffusion equation A We ll learn about these equations and the meaning ofterrns like parabolic later in the semester 13 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 2 r 42 erf x e alt the error function 71 0 erfc x J o e alt 1 erf x complementary errorfunctton n x erf x erf x Graph of erf x gt erfx is de ned for all x gt erfxgt0anderfcxgt0 gt the range of erfx and erfc x is 01 gt erf x is an increasing function erfc x is a decreasing function gt limerfx 1 limerfcx 0 gt lim erfx 1 lim erfcx 2 Exercise Using Matlab graph erf x and erfc x on the same plot over the domain 2 x 32 Exponential Integral Eix and E1x Ei x is most commonly encountered in aquifer well hydraulics The commonly used model for transient drawdown in response to pumping is called the Exponential Integral Model or the Theis Equation There are two different alternative de nitions for the exponential integral The rsts it it Eix J e alt J e alt xgt0 exponential integral function r t w t where t is a dummy variable of integration is the version encountered in well hydraulics The other version is it no e E1x 7dr xgt0 The two versions are related by mm Ex Note that Matlab uses E1 the second de nition and calls that funcition expint You need to transform it using this last equation to get Ei But you have to be careful From the Matlab help page for EXPINTx By analytic continuation EXPINT is a scalar valued function in the complex plane cut along the negative real axis Another common definition of the exponential integral function is the Cauchy principal value integral from lnf to X of exptt 5 We assume x is real here but the exponential integral is more generally defined for complex arguments zxiy as is clear in the relationship between the two definitions given in Matla 14 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology dt for positive X This is denoted as Eix The relationships between EXPINTX and Eix are as follows EXPINT xi0 Eix itpi for real x gt O Eix REAL EXPINT x for real x gt O Application The spacetime distribution of drawdown s m near a fully penetrating pumping well in a homogeneous isotropic con ned aquifer of in nite extent is given by the Theis model Q Q rzS SUJ MT E1 u 47g WW u Am W01 E1 u where Q m3s391 is the pumping rate r m is radius from the well I s is time T mzs39l is aquifer transmissivity S H is the aquifer storage coef cient u H is a dimensionless similarity variable and Wu is the Theis Well Function Note this problem has two independent variables s and t It s an example of multivariate calculus and the solution of a parabolic partial differential equation Exercise Using Matlab graph Eix and 7Eix on the same plot over the domain OS x 32 The second of these graphs represents the Theis Well Function see box Bessel Function of the rst kinds Jnx Bessel functions are commonly encountered in problems involving a radial geometry such as in well hydraulics or ow of water to a tree root in the vadose zone Bessel functions constitute a family of functions For illustration purposes we mention only the Bessel Functions of rst kind Bessel Function of the rst kind of integer order n are de ned by i n Jnx cosxcos t9sin2quot 9616 xgt0 7239 1 Fn 0 where F is the gamma function rz ftz lequot dt Rez gt 0 with corresponding speci c values for zero and rst order Bessel Functions of F6 Hi and FQ 7r respectively In particular the zero order function is 1 7r J0x J cosxcos 6d6 7r 0 xquot In the limit as x gt0 J x N Fn 1 6 The Bessel Function argument can be complex zxiy although we won t be considering that case 15 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Exercise Using Matlab graph J0x besselj in Matlab and K0x besselk on one plot for the domain 0 lt x S 10 where K0x is the Modi ed Bessel function of the second kind of order zero ie another Bessel Function Application Suppose the con ned aquifer mentioned in the previous box is leaky That is bounding the top of the aquifer is an aquitard and above that is a phreatic aquifer Pumping the con ned aquifer will induce leakage through the aquitard recharging it from above Eventually the pumping will be balanced by leakage and the drawdown in the con ned aquifer will reach a steady state That equilibrium drawdown is described by a Modi ed Bessel function of the second kind of order zero Q B T s m Kev J K where m is a leakage coef cient 3 m is aquitard thickness K m s39l is the vertical hydraulic conductivity of the aquitard and s Q r amp T were de ned in the previous box The plot of K0 r shows how drawdown varies with location and leakage coefficient New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Limits Limits are used to describe 1 discontinuities 2 the ends of graphs where x gtoo x gt oo 3 asymptotes 4 de nitions for derivative and integral later Limits are commonly encountered in hydrology for example when examining conditions near or very far from boundaries when considering what happens as time tends to in nity and when considering whether property values can be considered constant or must be allowed to vary Introduction Limit de nition for function fx lim f x L if for all x suf ciently close to but not equal to a x is forced to stay as close as we like and possibly equal to L Review on your own Onesided limits In nite limits Limits as x gtoo x gt oo Limits of continuous functions Various types of discontinuities especially jumps and blow ups Exercise Consider limits for the sketch 3 A solid do mean that f mg paint belongs 20 mg m and 2m small mm 2 men that he does not bzlong 20 mg Exercise What happens nearx oo 3 2 0 2 4 6 00 Limits for combinations of functions Review nding limits of combinations of functions Find the limits of components of the expression and put them together sensibly x25lnx 05 oo 3 261 2 2 Example lim oo xgt0 17 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Recall that in taking limits of components you end up with sums products and quotients which must be resolved as in the example above Some more examples from Ash and Ash 1986 in which each term is the result of a sublimit 0X00 004oo 000 008oo 030 2gtltoooo 401 000000 50oo oooooo 5039oo coxoooo 3woo 2oo0 Warnings A limit problem of the form 20 does not necessarily have the answer 00 Rather 20 00 while 2039 oo In general in a problem of the form non 00 it is important to examine the denominator carefully Indeterminate limits Limits of indeterminate form are commonly encountered 0 oo oo oo 00 0 no 0 0gtltoo0gtlt oooo oo oo oo 0 1 oo 0 oo oo oo 00 Each of these can be resolved None are truly indeterminate We can use the rule below for some problems Others require differential calculus later Highest power rule Uses the following principles 1 As x gt 00 or x gt 00 a polynomial has the same value as its term of highest degree For example lim x4 2x2 3x 2 lim x4 oo 2 As x gt 00 or x gt 00 a quotient of polynomials has the same limits as the quotient term of highest degree in numerator term of highest degree in denominator which cancels to an expression whose limit is easy to evaluate x5 x3 1 x5 x2 For example 11m T 11m 3 m HM 6x 7x x 4 HM 6x HM 6 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology The Derivative I Preview From freshman physics and calculus recall the concepts of Velocity and Slope Velocity ofa particle change in position change in time 5 ftAt 7ft At Slope of the line x y is given by the change in ycoordinate change in xcoordinate 0r slope E fxAx 7fx Ax 0r slope Ay Ax tangent E secant uses B and A ifo is small enough What is a positive slope negative slope Negative slope zero slope Zero slope Applicaton A number of diffusion like uxes in hydrologic applications are driven by a gradient slope of a state variable such as solute concentration with respect to distance A ux density is an intensive measure of an amount of something passing through a surface per unit time per unit area Fluxes of solute mass due to diffusion are described by F ick s First Law where solute mass ux density kg m392 s39l Dm dCdx where C kg m393 is concentration x m is location d dx m39l is the gradient operator and Dm m2 s39l is a diffusion coef cient That is the diffusive ux of solute is driven by a concentration gradient Notes a Notice the negative sign in Fick s Law Why b The units of each variable have been written out in SI units Observe that the units on the left and right hand sides of Fick s Law are in balance Balancing units is a useful way to check an equation and its solution for errors New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Definition and some applications of the derivative De nition of the derivative of fx f x lim W dx Axgt0 Ax Recall the difference between speed and velocity where speed lvelocityl The speed gives the magnitude but not the direction of slope while the velocity gives both magnitude and direction Exercise Use the letters to identz the following for the function fx Graph of yf x l 2 100 101 I I Largest positive slope Largest negative slope lg E Zero slope H Zone of small negative s ope Zones of N constant slope 100 101 I N Points of in ection Concave up Concave down f quot issue C Notation if yfx then the derivative can be written as f39r39ltxgtfxqfaf In hydrology we typically use the notation 1 i f x or Q dx dx dx A more physical interpretation of the derivative f 39 x is instantaneous rate of change of f wrt x where the average rate of change of f wrt x in the interval between x and xAx is df changeinf fxAx fx dx change in x Ax New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Applications Other diffusive uxes or gradient laws are heat conduction Fourier 3 Law which describes a diffusive ux of thermal energy due to a temperature gradient viscous momentum diffusion Newton Law of viscosity which describes the diffusive ux of uid momentum due to velocity shear gradients and groundwater ow Darcy 3 Law which describes the hydraulic diffusive ux of porous media ow due to gradients of hydraulic head Insomuch as these processes and Fick s Law have the same math but different physics they are called homologies Other processes invoking a similar homologous model include turbulent diffusion momentum mass and thermal uxes due to turbulent velocity uctuations dispersion in rivers due to velocity variations across the channel crosssection and mechanical dispersion and macrodispersion in aquifers due to upscaling and averaging of velocity uctuations caused respectively by pore structureconnectivity and aquifer heterogeneity In all of these models the ux is proportional to the gradient of a state e g concentration ux density amount 111392 5391 coefficient X gradient temperature or velocity with a proportionality coefficient that must be determined empirically For example with Darcy s Law we observe uid uxes speci c discharge and head gradients and take their ratio to get an estimate of hydraulic conductivity the proportionality coefficient for that expression Higher derivatives The second derivative of f denoted by f is the instantaneous rate of change of f 39 wrt x 2 d fxD fD2f yuor d y f d N t t o a lon f f x dxl dxl dx 2 2 2 Typical application from freshman physics Acceleration the derivative of velocity Warning iff is positive then it is not necessarily true that the object is speeding up z 1 Un1ts example from acceleratlon un1t of acceleratlons are m s whlle un1ts of speed or ve1001ty 1 are m s Concavity measure concave up f positive concave down f negative straight line f zero Point of in ection a point at which f changes sign Examples see graphs on previous page 21 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Applicaton Recall the box on F ick s F irstLaw using the symbol N to represent ux density Then N Dm dCdx How can we use this to nd out how much ux changes with location x Take the derivative of N dN d dC 3 1 D k m s m I J g dx dx If Dm is constant move it outside the outer derivative or 2 all mg g dDm Dm d C dx dx dx dx dx abc2 0 If the diffusion is steady doesn t change in time and if there are no sources or sinks of solute then N should be constant and its derivative zero Under this condition we expect that cilzCabc2 0 For this special case this is a model of conservation of solute mass Derivatives of basic elementary functions consider their graphs Derivative of a constant function dconst d 0 or written in another notation Dxconst 0 x Derivative of the functions x and xr doc 1 doc zrxH dx dx Derivative of sin x cos x and other trigonometric functions d smx cos x dcosx dtanx dx dx dx sinx sec2 x Radian vs degrees Radians preferred it s easier Derivative of ex and de nition of e Defn of e e is the base such that the graph of bx where b is a xed positive number has a slope of one at the point 01 This also leads to the de nition of the derivative of e dexpoc de e or D ex ex dx dx The derivative of an inverse function LL dx a dy New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 1 1 It s used to nd der1vat1ves for In x s1n x cos x now that we have der1vat1ves of ex s1n x and cos x For example Derivative of In x y Letylnx then xeyand di ey x y dy Thus Mdliii or Dxlnx1x dx dx ey x dy Derivatives of inverse trigonometric functions use the same idea Table ofbasic derivatives7 Dxc0 stinxcosx 1 7 1 st1n x7 2 Dxxl Dxcosxs1nx 95 1 2 Dxx rxf Dxtanxsec x 1 1 Dxcos x 2 2 Dxlnx lx Dxcotxcsc x x X7 X 7 Dxe 7e stecxisecxtanx 1 7 Dxtan x7 2 x Dxcscxcscxcotx Nondifferential functions Discontinuous functions If f is discontinuous at xx0 then f is not differentiable at xx0 Equivalently if f is differentiable then f is continuous Cusps A cusp arises when a graphs is continuous in value but suddently changes direction so that the curve is not sm00th and in this case f is not differentiable Differentiability is a more exclusive property that continuity A differentiable function is continuous but a continuous function is not necessarily differentiable Leads to piecewise continuous functions 7 Be cautious with the tables presented in these notes They have not been proofed nearly as well as what you will find in standard math tables and in any event they are not complete You should probably refer to standard tables instead when solving problems In any event if you find an error in these notes bring it to my attention 23 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology A solid dot means I that the point Exercise B l E set What is C circle means that happening at the point does not the indicated I D belong to the set points 39 I l i x Derivatives of constant multiples sums products and quotients Constant multiple rule for c x where c is a constant Dx c f c Dx f c f 39 Sum rule for the derivative 0ffxgx Dx f g Dxf ng f39 g39 Product rule for derivative 0ffxgx Dx f g f Dx g g Dx f f g39 g f 39 Warning don t differentiate f and g separately and multiply Product rule for more than two factors eg three factors Dxf g h f g h f g39 h f 39g h Quotient rule for the derivative 0ffxgx Dx fg w M g g Derivative of a function with two formulas do it by intervals Example Suppose x lln xi Then x In x When In x 2 0 but x In x When In x lt 0 Thus lx if0ltxltl lx if x21 lnx if0ltxltl lnx if x21 fx so that f39x Derivative of a composition The chain rule for the derivative of a composition yyu is a 6M dx du dx or stated another way for function f 1310106 f39u 3906 Example New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology What is alsin x2dx Let y sin x2 Then ux2 andy sin u The derivatives are dyalu cos it and alide 2x Thus alsin x2dx cos it 2x 2x cos x2 Warning don t omit a step in this approach Table of basic derivatives incorporating the chain rule Dxurrur391u39x stecusecutanuu39x Dxlnuiuyx Dxcscucscucotuu39x u D e e u39x 1 x stm39lu 2 u39x stinucosuu39x 11 39 39 1 Dx cosu smu u x Dx 0081 2 utx Dxtanuseczuu39x V1 2 39 1 Dxcotu csc u u x DXtanlu 1u2 uioc Implicit differentiation and logarithmic differentiation Implicit differentiation Example What is the slope of the graph of y3 7 6x2 3 at the point 23 This equation defines yx implicitly Solve algebraically for y to obtain y 6x2 3 This equation expresses y explicitly as a function of x We can take the derivative of this explicit function and apply it at the subject point to get the desired slope Try it The answer is 89 But you don t have to approach the problem this way In fact there are many cases where you won t be able to transform an equation to an explicit form You can nd the derivative y39 implicitly Recall the implicit equation y3 7 6x2 3 Differentiate with respect to x on both sides of the equation In this procedure y is treated as a function of x so that the derivative of y3 with respect to x is 3y2y39 by the chain rule Thus New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 3y2 39 7 12x 0 y 12x3y2 4x y2 y 23 122 332 24 27 89 yielding the same slope as the explicit approach The process of nding y39 without rst solving for y is called implicit di erentiation Be careful don t omit extra occurrences of y39 demanded by the chain rule Logarithmic differentiation Given a function yfx whose base is not e e g not ex and with an exponent that contains the variable x Two examples are 2quot and sin x Derivatives of this type of function are approached by rst taking the logarithm of both sides of yfx and then finding f 39 by implicit differentiation The approach is called logarithmic di erentiation Example Consider ysin 90 Take the log of other sides to obtain lny x In sin x This describes y implicitly but does so without any exponents Differentiate implicitly and use the product rule on x lnsin x to get l dlnsin x dx 1 dsin x cosx y x lnsmx x lnsmxx lnsmxxcotxlnsmx y dx d smx dx smx Therefore dsin x x d y39 yxcotxlnsmx smx xcotxlnsmx x Antidifferentiation Above we concentrated on the differentiation process of nding f 39 given f Now let s reverse that and seek the function f given the derivative f 39 The process is called antidi erentiation and has several types of application including integration Commonly encountered antiderivatives of basic functions Ikdx kx C where k stands for a constant 1 Isinxdx cosxC 2 IcosxdxsinxC 3 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology IexpxdxexpxC or Ie dxe C 4 Ix39dx xm C r 1 5 r1 IidxlnlxC x 0 6 x Ie dxe C Less commonZI encountered antiderivatives of basic functions IseczxdxtanxC 7 Icscz xdx cotxC 8 IsecxtanxdxsecxC 9 Icscxcotxdx cscxC 10 J 1 2 dxsin391xC 11 l x 1le dxtan391xC common ingw hydrology 12 Antiderivatives of elementary functions to fxdx c jfxdx 13 and j fxgxdx j fxdx j gmdx 14 So for example c1fx c2 gm dx c1 1 fxdx c2 1 mm Extending known antiderivative formulas In general if F x is an antiderivative of fx then jfaxbdxiFaxbC 15 a In other words if x is replaced by axb in 1 7 12 antidifferentiate as usual but insert the extra factor 1a Example Consider Icosnx 7 dx which is ofthe form in 15 where 6171 b7 andf cos Apply 15 to nd New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Icos7rx 7 dx isin7239x 7 C 7239 Check by taking the derivative of the RHS right hand side Introduction to parametric equations When a process is described by two dependent variables say x and y and their equations xt and yt in terms of a third variable in this case t the equations are parametric equations and the third variable is called the parameter The most common appearance on parametric equations involves kinematics such as keeping tracking of a uid parcel 0r tracer packet as it moves through a multidimensional hydrologic system You ve encountered this problem before in freshman physics Example Consider the ballistic model of a bullet red from a gun The acceleration velocity and position of the bullet are respectively described by the following expressions in English units of feet and seconds otherwise not shown They assume that the gun muzzle is aimed at an angle of 300 with the horizontal and that the muzzle velocity is 60fps From the initial muzzle velocity and muzzle orientation and given Earth s gravity the acceleration at all times and the initial velocity in both the horizontal and vertical directions is known The velocity at later times t and the position xy is determined by sequential antidifferentiation Vertical movement y t 32 for all t y39t 32 t 30 yt16t230t40 17 Horizontal movement x39t 30 V3 for all t gt 0 xt30 3t 18 Equations 17 and 18 are parametric equations and tis the parameter If 18 is solved for t and substituted into 17 we have a non parametric equation for yx height as a function of horizontal distance the path of a parabola 2 x x 4x2 x x 16 30 40 40 y 3043 3W3 675 13 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology The Derivative II Relative maxima and minima It is useful for a wide variety of reasons to be able to locate the peaks and valleys of a function De nition of relative extrema I I l x1 x2 x3 x4 x5 x5 x7 A function has a relative maxima at x0 if xo 2 x for all x near x0 A function has a relative minina at x0 if xo S x for all x near x0 Where are the relative minima and maxima in the graph If f is differentiable and f has a relative extreme value at x0 then f 9 0 Equivalently if f 9 is a nonzero number then f cannot have a relative extreme value at x0 On the other hand if f 39 x0 0 then a relative extreme value may see x2 x3 x4 but need not see x1 occur Critical numbers If f 9 0 or f 9 does not exist then x0 is called a critical number Includes all relative minima relative maxima and possible nonextrema see x1 x5 x7 as well First derivative tests Let f be continuous To identify a critical number x0 as a relative minima 0r maxima examine the sign of the rst derivative to the left and right of x0 Example x 4x5 5x4 40x3 Set f 9 0 and solve for critical numbers the roots f x0 20x4 20x3 120x2 20x2 x2 x7 6 20x2 x 3 x 2 x 0 3 2 are the critical points Now examine the sign of f 39x between the critical points New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Second derivative tests Applicable to critical points x0 at which f 9 0 l Iff39x0 0 and f x0 lt 0 thenfhas a relative maximum at x0 2 Iff39x0 0 and f x0 gt 0 thenfhas a relative minimum at x0 3 If f 9 0 and f x0 0 then no conclusion can be drawn Continuing previous example where critical points are x 0 3 2 and x 4x5 5x4 40x3 f x0 80x3 60x2 240x f 2400 f 00 f 3900 Suggesting that x 2 is a local maxima x 3 is a local minimum and we can draw no conclusion about the other point Application How do apply these maxima and minima concepts in hydrology Here are three types of application i First consider physical extrema Suppose the function f represents topography and x represents map coordinate A local maxima de nes a ridge top and drainage divide while a local minima de nes the drainage which is often the location of a stream In groundwater hydrology the local maxima of a watertable aquifer is the water table divide separating subsurface ow systems which the local maxima of solute concentration in a contaminant plume identi es the spine of that plume For our second type of application imagine designing an engineered facility like a well eld contaminant remediation scheme or dam on a stream These problems are often set up to globally maximize or minimize some objective function such as cost bene ts or frequency of failure where x is called a decision variable and represents the design choices being made such as size of the dam or location and pumping rate for a well These are called design optimization problems 39 The third application type refers to using data to build and parameterize assign numbers to parameters a hydrologic model The parameters represented by x are varied until some measure of model performance represented by f approaches an extreme value The performance measure is usually a sum of squared differences between observed and modeled states like head or ow rate and we seek an absolute or global minima This application is called an inverse problem since you are solving for parameters given states rather than the other way around New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Absolute maxima and minima As mentioned in the box we often we want to nd the absolute or global maxima or minima not the local values Finding maxima and minima Restrict x to the interval of interest then the absolute maxima or minima will lie at a A critical value off Solve for f 39x 0 and also locate places where derivative does not exist Let f x0 represent the resulting list of critical values This candidate list contains the relative maxima and minima as well as other values Expand the candidate list to also include b The end values off ends of the interval8 0 In nite values off 1 I I I I I l 4 5 Example Find maximum value of x x4 4x4 6x27 8 for 0 S x S 1 Note that f is continuous in the interval 01 Find critical values offin 01 get x 0 35 Given the constrained domain 01 for x keep only the two positive roots f0 8 and i Z m E 079 E 94 The largest ofthese isf0 8 When solving an optimization or inverse problem see box we often define constraints which restrict the domain of the decision variable x ie the dam can be only so big or the parameter value can t exceed suchandsuch a value These constraints can be somewhat arbitrary When the solution lies on one of these constraints then we may have to ask if the domain size has been overly restricted 3 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Find end points for x 0f0 8 is both a critical and an end point for the end pointx lfl 9 Evaluatefat critical values and end pointsf0 8f079 E 94fl 9 Pick x for largest f that f is the maximum value and the corresponding x is its location f0 8 the largest value of f in the domain 01 is 8 and its located at x0 Warning sometimes we seek f and sometimes x at the maximum or minimum L Hopital s Rule and orders of magnitude A way to evaluate indeterminant limit forms L Hopital s Rule f x 0 oo oo oo 00 Suppose 11m IS one of the 1nderterm1nant forms Ha gx 0 oo oo oo 00 that is involving indeterminate quotients Then f39x g39x Switch to lim If the new limit is L 00 or oo then the original limit is L 00 or oo respectively If the new limit does not exist because f xg x oscillates badly then we have no information about the original quotient L Hopital s rule doesn t help in this situation If the new limit is still an indeterminate quotient L Hopital s rule may be used again The rule is also valid for limit problems in which x gta x gta39 x gt oo x gt 00 Warning L Hopital s rule applies only to indeterminant quotients ls should not be used nor is it necessary for limits in the form of 200 the answer is immediately zero or 30 the answer is immediately oo or 62 the answer is immediately 3 and so on Examples 3x3 6x2 5 Find lim 3 2 which is of indeterminate form oooo Ans 32 H 2x 5x 3x New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology sin x F1nd 11m whlch 1s of 1ndeterm1nate form 00 Ans l xgt0 x Order of magnitude f x gx If the limit is 00 then x is said to be a higher order of magnitude than gx that is f grows faster than g is of form oooo Suppose x and gx both approach 00 as x gtoo so that lim If the limit is 0 then x is said to be a lower order of magnitude than gx If the limit is a positive number L then x and gx have the same order of magnitude Pecking order of functions that approach 00 as x gtoo listing them in increasing order of magnitude from slower to faster lnx lnx2 lnx3 J x x3 x2 x3 e 4 Order of magnitude of a constant multiple In general x and c x have the same order of magnitude for any positive constant 0 Highest order of magnitude rule In general as x gtoo only a quotient involving functions on the list in 4 has the same limit as term with the highest order of magnitude in the numerator term with the highest order of magnitude in the denominator For example oo e e 3 11m 3 llm 3 oo x 2x oo Hoe x We x lim Since ex has a higher order of magnitude than x3 Indeterminant products differences and exponential forms For the forms 0 X 00 or 0 X 00 use algebra or a substitution to transform to a quotient form and apply L Hopital s rule Warning Don t use L Hopital s rule indiscriminately Also verify your result whenever possible For the forms 00 00 or 00 oo use other methods For the forms 00 000 1 C use logarithms to change exponential problems into products New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Newton s Method Newton s method uses calculus to try to solve equations of the form x 0 Solving x 0 is equivalent to nding where the graph of the function x crosses the xaxis Procedure Guess a root off calling the first guess x1 Draw a tangent line to the graph of f at the point x1 fx1 Let x be the x coordinate of the point where the tangent line crosses the x axis Now start again with x2 Draw a tangent line to the graph of f at the point x xz Let x3 be the x coordinate of the point where the new tangent line crosses the x axis Now start again with x3 and so on Divergent Convergent The numbers x1 x2 x3 will approach the root if the method is convergent or if not x1 x2 x3 will diverge See gures More often than not the method is convergent it converges exactly if f is quadratic or linear in x If it is not convergent try another initial guess The equation point slopeformula for a tangent line is y fx1 f39 x1x x1 f x1 f 39 951 Set y0 and solve for x to find that when the line crosses the xaxis x x1 This value of x is taken to be x2 Generalize to the procedure new x last x M or for iteration counter 71 x 1 fx f39 1ast 96 f xn Exercise for later We ll apply this method using Matlab using standard Matlab Newton routines and also writing our own programs New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Differentials Recall the de nition of a di erential Idy f x dx change iny when x changes by 1 Example dsin x cos x dx that is the differential of sin x is cos x dx If x changes by dx then sin x changes by approximately cos x dx Example The volume of a sphere is V 437tr3 where r is its radius What about a spherical shell volume of a spherical shell vol outer sphere 7 vol inner sphere rdr3 7239r347239r2drrdr2 dr3 6 where the inner sphere is of radius r and the outer sphere has a larger radius r dr To nd an approximate formula use the differential dV 47239r2 dr 7 Note that this equals the rst term in 6 and is the desired approximation It is often easier to nd such an approximation using 1 than it is to solve the problem exactly The difference between 7 and 6 is the error of the approximation here equal to 8 47239r dr2 dr3 which is small if dr is small and approaches zero as dr gt 0 Application Most fundamental models of hydrologic processes involve conservation of mass momentum and or energy Sometimes we use an extensive model dealing with amount of these quantities over a spatially lumped model of for example a hydrologic body like a plot hillslope watershed river reach lake aquifer region continent or even the entire planet More often we use a spatially distributed intensive model where states like hydraulic head uid velocity thermal energy and solute concentration vary over space and we examine intensive quantities usually quantity per unit area or unit volume To develop these distributed models we use differentials We use them to describe how uxes of mass momentum or energy change in space where in equation 1 y is the ux density and x is location or to describe how intensive quantities vary over time where y is the amount of a quantity per unit volume or area and x is time New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Separable differential equations It is often possible to separate the variables in the DE differential equation dy f 39x y dx so that the equation has the differential form expression in x dx expression in y dy Then the equation is called separable and is solved by antidi erentiating both sides This works on first order equations only We call this approach separation of variables SOV Example x Consider the DE y39 x 2 Rewrite as y2xy x x y x Integrate antidifferentiate both sides to yield y3 x2 C d More conventlonally and convenlently d y 12 lead1ng to separatlon as yzdy xdx x 1 1 Then ant1d1fferent1ate Iyzdy dex to get y3 3x2 C These are implicit solutions for y You can solve algebraically to get explicit solutions Example exponential decay or growth This type of problem occurs widely in hydrology For example decay can be due to radioactive decay or 1st order biotransformation or hydrolysis of an organic compound both of which involve decay of concentration Another application is discharge from an aquifer to base ow in a stream or discharge from a lake where water levels decay over time approximately exponentially In all these cases the rate of change of something the dependent variable depends on the quantity of that something remaining As the quantity decreases over time the rate of change slows down This type of decay is called exponential decay as is made apparent below If on the other hand something is added and the quantity is increasing over time according to this model it is called exponential growth In the exponential decay model the rate of change of the dependent variable y with respect to time t is described by9 dy dt ky where k is a rate coefficient The model also needs an initial value IV of y Call the IV yF0 yo Solving by SOV we get 9 The minus sign on the RHS is significant it leads to decay instead of growth 10 For example in radioactive decay the coefficient k is a linear function of radioactive halflife 36 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 1dy k dt y In y k t C Using the IV to determine constant C 1n y0 0 C lny ktlny0 lny lny0 lnl kt y 0 y yoe k The dependent variable decays exponentially in time The dependent variable y starts with the initial value yo and decays exponentially to zero Exercise Plot ratio yyo using Matlab for three different values of k 05 l 2 for the domain 0 S t 5 5 Suppose instead of decaying the process is one of exponential growth of say population y people and their demand for water bacteria etc If l represents the growth rate constant then the model is dy 1 dt y You should be able to show that the population is described by 40 yyoe where the initial value at time to is yF to yo New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology The Integral Preview Integrals appear as models themselves or as part of solutions to models Often we de ne new functions eg Erf and Bi to replace integrals which frequently appear in these solutions Integrals as models or their solution appear in the calculation of time length area and volume and in extensive properties like the amount of mass energy and momentum or their uxes Integrals appear in calculating the amount of something an extensive quantity or by dividing by the interval over which it is calculated the average amount of something an intensive quantity eg a ux density over that interval Integrals appear in moment equations and are used to calculate physical moments like the moment of inertia or probabilistic moments like the variance or square of the standard deviation which is a second central moment Definition and some aspects of the integral The integral is de ned by j fxdx 3 2 fxdx 1 17 For a simplistic but use ll viewpoint we can ignore the limit and consider I f xdx as merely Z fxdx found using many subintervals of ab In other words think of the integral as adding many representative values off each value weighted by the length of the subinterval it represents ie the dx s can vary as sketched below from Zfxdx The process of computing the integral is referred to as integration The integral symbol is an elongated S for sum the same symbol is used in a different context for antidifferentiation The symbols a and b attached to the it indicate the interval of integration The numbers a and b are called the limits of integration and f is called the integrand The sums of the form 2 fxdx are called Reimann sums New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Consider the application of integrals and average values I fxdx T iAverage value of f in ab 3 Think of the numerator as the weighted dx values and the denominator as the sum of the weights b a de 3 Some properties of the integral fUWngmkffMxfme I k fxdx k J fxdx where k is constant 10 f fxdx I fxdx fxdx ifaltbltc 11 Reminder about dummy variables 2 J x3dx is a number without the variable x appearing anywhere in the answer Could also write it as Z Z I fair or ana The letter x or t or a is called a dummy variable because it is entirely arbitrary 0 0 In general 117 fxdx Ib ftdt 17 fudu and so on The Fundamental Theorem of Calculus The Fundamental Theorem If f is continuous on ab and F is an antiderivative of f then 17 L mmHm Hm D 3 Example 1 J x dx ijdx xz 0 Example 2 Suppose x2 2 7 is the antiderivative of x rather than x2 Why not 7 is an arbitrary constant 7 073 fxdx ix2 7 0 2 2 The 7 cancels out New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 2 1 Example 3 J 2 dx x 2 1 1 2 l dx 1 J x2 x 1 2 Integral of a constant function Ibkdxkb a 2 Integral of a zero function f7 0 dx 0 3 Integral of a piecewise function11 with several formulas x2 ifo3 Suppose fx 2x3 if3ltxlt7 l7 x ifo7 To nd L10 fxdx use 11 ofpreVious section I010 fxdx Lsxzdx L72x3dxj 17 xdx x3 3 2 7 x2 10 3 x 3x3 17x 952255 865 0 7 Definite V indefinite integrals The symbol I is used in two different and distinct ways 0 First 117 f xdx is an integral de ned as the limit of the Reimann sum Z xdx In this context dx stands for the length of a typical subinterval of ab The symbol I is used to signify summation Second I f xdx is the collection of all antiderivatives of fx In this context the symbol dx is an instruction to antidifferentiate with respect to the variable x The symbol I is used because one of the methods of computing an integral using the Fundamental Theorem of calculus begins with antidifferentiation 11 One important application of integration of piecewise fmetions is in finite element numerical models 40 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Frequently both 117 f xalx and I f xalx are referred to as integrals in particular 117 f xalx is called an de nite integral while I f xalx is called an inde nite integral rather than integral and antiderivative No matter which terminology you choose it will always be true for example that I 3x2 alx x3 C where C is an arbitrary constant while f3x2dx 19 Numerical integration The evaluation of r7 fxalx Fb Fa seems like it should be simple but it is often dif cult and sometimes impossible to nd an antiderivative F We then resort to numerical integration to approximate the de nite integral A variety of numerical integration techniques exist each involving lots of arithmetic almost always done on a computer All are approximate and have errors For some methods it is possible to calculate a theoretical estimation of the errors For others you simply increase e g double your resolution try again and see how much improvement you get In calculus you learned about three of these The rst is simply Riemann Summation for finite size alx The second is the trapezoidal rule The third is Simpson s rule Later we ll introduce Guassian Quadrature and possibly other methods Riemann sums approximate the integral by a series of steps rectangles In essence each die is assumed to have a constant value off a constant function Trapezoidal rule approximate the integral by a series of trapezoids In essence you are approximating f over each increment alx by a straight sloped line that is a linear function de ned by the value of f at each end of the increment WW Rieman Sum Trapezoidal Rule Simpson s Rule Simpson s rule approximate the integral over two neighboring increments tting a parabola that is a quadratic function to the three values circles in the sketch of f de ning each of the two increments For the two increments fit a quadratic to the left middle and right values of the function Then move on to the next pair of intervals and repeat If the alx s are constant equally spaced then it can be shown that New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 17 h J m y0 4y1 2y2 4y3 2y4 quot392yn72 4an yn where h dx the size of the x increment There is no easy error estimator for Simpson s rule Nonintegrable functions Suppose x 1x and you want to integrate it from 0 to 1 by computing the Riemann sum What value of f do you apply for the rst increment which has its left edge on zero What happens when you change dx Discontinuous functions can be nonintegrable However some discontinous functions can be integrated using the following Improper integrals For intervals of the form 61 oo oob oooo gt1 gt1 b1 gt Example1 xdx J xdx xdx ie to integrate on 100 integrate from x1 to x b and then let b approach 00 rid 139 bid 139 1 b 139 1 13 1 100 000 x Memo112 ngt In general ffxdx 11LmOLbfxdx and fxdx B133 fxdx In abbreviated notation if F is an antiderivative of f then ffxdx Fx and fxdx Fxo Convergence vs divergence Evaluating an improper integral always involves computing an ordinary integral and taking a limit If the limit is nite the integral is said to be convergent If the limit is plus or minus in nity or no value at all the integral diverges r 1 Example I 2 2 dx ANS 12 convergent w x New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Integrating on the interval oooo The usual definition is w ggf w ltwl w w dx tan391 x no 1 no 7239 7239 Exam 1e 7r p Lolx2 2 2 Integrating functions which blow up at the end of the interval of integration Iffblows up atx athen 17 fxdx Fb Fa Iffblows up atx bthen ffxdxFb39 Fa Integrating functions which blow up within the interval of integration Suppose that alt c lt b and that f blows up at c then 17 7 17 5 b L fxdx fxdx fxdx Fxa Fx The Integral II Integrals with variable upper limit Suppose we de ne a new integral HnLfmm 2 Some functions of this form are Erf x e39 dt errorfunctz39on 3a 5 0 Erfc x l Erf x complementary error function 3b 72 Bi x J ert exponential integral function 30 Si x 5ntdt the sine integral function 3d New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Computing I x If t has a readily available antiderivative then an explicit formula for I x may be found by using the Fundamental Theorem of calculus Example 1x J 3t2dt t3 x x3 l 1 If f has a simple graph it may be possible to nd 1x by integrating f in sections The derivative of Ix Often sought Example if Wu Eiu gives well drawdown its derivative gives groundwater velocities needed to compute uxes owpaths and travel times The derivatives of 1x wrt x are given by the integrand used in the original formulation of 1x This is not a coincidence In general if 1x r f 0dr then I xfx at all points where f is continuous In other words if a continuous function f is integrated with a variable upper limit x and then the integral is differentiated with respect to x the original function is obtained This result is called the Second Fundamental Theorem of Calculus r equot2 dt 2e392 0 J Example d erfcx dx dldx d erfx dx 0 Li J dx 72 7 Example d Eix dx iJ e dt L dx t x New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Antidifferentia tion Introduction Standard tables such as the CRC contain only a limited number of antiderivatives Differentiation is easier There are many rules to help us sums products quotients compositions but in antidifferentiation there are fewer rules There are no product quotient or chain rules for antidifferentiation The best we have are sum and constant multiple rules to fxdx c jfxdx 1 i fx gm dx i fxdx i gmdx 2 In the absence of suf cient rules we consult tables of antiderivatives but even the large volumes of tables13 that you nd in the library have their limits You need to know how to extend them and the simpler tables you nd in a text book or the CRC math tables Below we review some basic methods to achieve this extension Substitution Example What is 12x cos xzdx We can nd it from the derivative By the chain rule Dr sin x2 2x cos x2 so that we know that 2x cos xzdx sin x2 C But how can we nd the antideriviative formula without seeing the derivative rst For example because we don t have the derivative already and we can t nd it in the tables Reverse the chain rule to simplify to a form in the tables of antiderivatives The chain rule for the derivative of a composition yyu is Ly 26L dx du dx In this example use the device ux2 du2x dx Substitute this into the integral to get IZxcosxzdx Icosu du sinu C sinx2 C More examples 12 The antiderivative tables presented earlier in these notes are but a faint shadow of even the most basic tables such as you will find in the CRC tables or a good calculus textbook You ll need to consult those tables and not rely only on these notes 13 There are two readily available exhaustive references for antiderivatives and also for an army of definite derivatives Gradshteyn LS and lM Ryzhik 1980 Table aflnlegrals Series and Products Academic Press New York NY39 Rectorys K 1969 Survey aprplicable Mathematics MIT Press Cambridge MA 45 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 3 l Ix dx let u2 2x47 and x3dx 18du Ans C 2x4 72 82x4 7 1 2 Icosz xs1n xdx let it cos x and du s1n x Ans 300s3 x C Comment There is no set rule on when or what to substitute One useful tactic is to search the integrand for an expression whose derivative is a factor in the integrand and let u be that expression In example 1 the expression 2x47 has the derivative x3 give or take an 8 which is a factor In example 2 the expression is cos x its derivative is sin x give or take a negative sign and is a factor More than one substitution may work Some Algebra including properimproper fractions amp partial fraction decomposition Sometimes you can use algebra to reduce a function to another function listed in the tables Example 1 thisformulaisin std muest 12 r l l l l l dx dx Jxl6x23 V6IVx2l2 V6 Jxlazuz l l l l 2 2 C l 2 C Jgnula u azm Jgnx 2x 147 du Improper fractions Improper fractions such as are those where the degree of the numerator is greater or x2x2 equal to the degree of the denominator Proper fractions such as x are those where the x2 1 degree of the numerator is less than the degree of the denominator The improper kind are rarely listed in the antiderivative tables To find an antiderivative for an improper fraction that is not listed begin with long division divide out the improper fraction xsdx x2 x 2 I Divide out14 the improper fraction integrand x3 x2 x 3 x 6 x2 x 2 x5 w1th remalnder 2 x x2 That is the integrand is expanded as the sum of a polynomial and a proper fraction Example 2 Consider J 14 Refer to your algebra basics for details 46 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology x5 3 2 x 6 2 x x x32 x x2 x x2 3 proper fraction polynominal proper fraction Let s integrate the polynominal 4 3 Z x3 xZ x3dxxT x3xc 4 Now for the proper fraction break it up into digestible pieces x 6 x x2x2 x2x2 x2x2 Then integrate xdx 1 2 1 dx 2 lnx x2 J2 x x2 2 2 x x2 l l 2xl 6 lnx2x2 tan391 C 2 J7 J7 and dx l2 2x1 6 tan 1 C 7 Jx2x2 J7 J7 Finally combine 4 6 and 7 5 4 3 2 Iflx x x 3x itan39l llnx2x2K x x2 4 3 2 J7 J7 2 Partial Fractions Tables often omit proper fractions as well when the denominator is greater than 2 Partial fraction decomposition is an algebraic technique that helps in this and other several other applications we will Visit later regarding ordinary and partial differential equations In each instance it is easier to work separately with the partial fractions than with their sum We want to decompose a proper fraction which is not in the tables into a sum of partial fractions which are either in the tables or which may be antidifferentiated by substitution or inspection The decomposition is accomplished in several steps Step 1 Factor the denominator as far as possible Step 2 The nature of the decomposition depends on the factors in the denominator If a factor is linear such as 2x3 then a fraction of the form A2x3 appears as one of the partial fractions New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology If a nonfactorable quadratic such as x2 x 10 appears in the denominator then A x B 2 appears 1n the decompos1t1on x x 10 If a repeated nonfactorable quadratic such as x2 x 104 appears in the denominator then AxB L CxD L ExF L GxH x2x10 39 x2x102 39x2x103 39x2x10 appears in the decomposition Step 3 Determine A B C in the decomposition various methods see example for one method Example 2x2 3x 1 Decompose and then ant1d1fferent1ate The denom1nator has already x 3x 2x 1 been factored accomplishing step 1 Regarding step 2 the three factors in the denominator are all linear so each has a partial fraction consisting of a constant divided by the respective linear function Thus 2x23x l A B C 7 m m x3x2x l x3 39 x2 39 x l Multiply this equation by the denominator x 3x 2x l to get 2x2 3x 1 Ax 2x 1 Bx 3x 1 Cx 3x 2 3 This equation is suppose to hold for all x so we can solve it by taking three arbitrary but convenient numerical value for x Values 3 2 1 are convenient because each of them set two of the three terms in 3 to zero Ifx3 then84A A2 Ifx 2 then 1 3B B 13 lfx 1 then 4 12C C 13 We could use any three values and solve the resulting three equations simultaneously but it wouldn t be as convenient The result is 2x23x 1 7 2 13 l13 x3x2x l x3 x2 39 x l We can down antidifferentiate this term by term using tabulated antiderivatives J 2x2 3x 1 dx2lnx 3 llnlx 2 llnlx 1 K x 3x 2x 1 3 3 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Integration by Parts The idea behind integration by parts is to reverse the derivative product rule Since Dxuvuv vu we have the integration formula uv vu dxuv But problems don t usually originate in this form so we continue to a more useful version of the integration formula Write it is uv dx uv l vu dx and to make it easier to apply use the differential notation dvv dx duu dx to get With this formula you trade one problem for another which may or may not help depending on how good a trader you are To apply 1 a factor in the integrand must be called it The rest of the integrand including the factor die is labled dv Success of the method called integration by parts flepends on being able to nd v from dv this is itself antidifferentiation and on being able to nd v du Example Ie cos xdx Let u ex and dv cos x dx Then du exdx and v sin x and Ie cos xdx e sinx Ie sin xdx That s doesn t appear to be helpful but let s stick with it and apply integration by parts again to the second term on the RHS Let u ex and dv sin x dx Then du exdx and v cos x to get Ie cos xdx e sin x ex cos x I e cos xdx The integral on the RHS is our original integral which seems circular But note that it now appears on both sides of this equation Collect terms involving this integral to get 1 Ie cos xdx 3e cos x e Sln x C Recursion formulas Some antiderivative formulas said to be recursive can be applied repeatedly without a problem in order to get an answer especially for forms sinm x and 00539quot x Example 1x3 sin x dx Many tables list the pertinent formula Ixquot sin x dx xquot cos x an sin x nn 1JxH sin x dx Applying that here with n3 1x3 sin x dx x3 cos x 3x2 sin x 32 xsin x die This last integral is usually available in tables and we can nish the job New Mexico Tech Hydrology Program Trigonometric substitution A collection of integrals in the tables can be found using substitution of a special type called a trigonometric substitution These are based on angle substitutions eg x a x tanu cosu s1nu 6 Iazx2 V612x2 wazx2 xazx2 7 7 a x a cotu secu cscu x Example secz u du iJcscu du 61 a 1 1 x a2x2 atanu cosu l lncscucotu C ln Hi from standard math tables a a where xa tan it yields dx a seczu du and laz x2 Choosing a method If a function is not listed in the tables a Complete the square if the problem involves ax2 bx c but the only similar formula in the tables does not contain the term x 1 lazx2 Hyd 510 Quantitative Methods in Hydrology C cosu b Substitute if there is an expression in the integrand whose derivative is also a factor in the integrand c Use long division on improper fractions d Decompose proper fractions if they aren t in the tables e Use integration by parts to get recursion formulas Integration by parts may also work when other methods don t seem to apply f If a problem involving a2 i x2 or x2 a2 is not in the tables try trigonometric substitution Series Series representations are useful for a variety of reasons For example we may have a complex function that is difficult to work with but if we represent it by a series we can work with each of the simpler terms in that series integration differentiation We may also nd that only the rst few terms of the series are all that is needed to approximate the function making it ever easier For example drawdown in a con ned aquifer can be represented by an Exponential Integral Theis 50 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Well Function but if enough time has elapsed typical in application the higher order terms of the series representation of the Exponential Integral are unimportant The lower order terms involve a logarithm Drawdown can then be approximated by a logarithm the Jacob Approximation of well hydraulics Note The following review is super cial but it highlights issues of concern Consult your calculus text for details Introduction The symbol a1 a2 a3 a4 is called a series with terms a1 a2 a3 a4 no Also written as 2 an or even 2 an nl Partial sums of this series are 3101 Sza1az S3a1aza3 etc If partial sums approach a number S that is if lim Sn S then S is the sum of the series and we write 2 an S In this case the series is called convergent in particular it converges to S Else the series is divergent 1 1 1 1 1 Exam 1e quot has p quot2412 2 4 8 16 S121 S2ll2 S2lllZ S4llli etc 2 2 4 4 2 4 8 8 2 4 8 16 16 1 Or 11m Sn 1 and the serles has sum 1 that IS converges to 1 We wr1te 23quot Two convergent series can be added term by term llli l 2 4 8 16 2liim lii l 416 64 256 5 4 16 64 256 5 Dropping initial terms New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology If the rst m terms of a series are dropped then the new series and the original series will both converge or both diverge In other words chopping off the beginning of a series doesn t change convergence or divergence It does change the sum of a convergence series Geometric series Form Earquotaarar2ar3ar4 a 0 quot0 is called a geometric series with ratio r Geometric series test Has simple criterion for convergence and if the series converges the sum is easily found lfr 2 1 or r S 1 then Zarquot diverges quot0 Ifl lt r lt 1 then Zarquot converges to la n0 Example XIX quot n0 Application For example geometric series are encountered in probability theory Convergence Tests Positive series All positive terms Four rules to test convergence Not reviewed here Standard series Increasing order of magnitude lnn 1n n2 1n n3 1 n quot32 n2 n3 2quot100quotn Reciprocals lln n In n392 1n n393 n39m n39l if 71 n4 239quot100 quotln The entries approach 0 as 71 gt00 The order of magnitude decrease reading from left to right That is they approach zero more rapidly Subseries of a positive convergent series If Eaquot is a positive convergent series then every subseries also converges Limit comparison test Suppose that an and bquot both positive have the same order of magnitude Then Eaquot and Ebquot act alike in the sense that either both converge or both diverge 52 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Alternating series Let an be positive A series ofthe form 2aquot 1 1 a1 a2 a3 a4 is called a alternating quot1 series The partial sums of a positive series are increasing so a positive series either converges or else diverges to 00 But the partial sums of an alternating series rise and fall since terms are alternately added and substracted therefore an alternating series either converges diverges to 00 diverges to oo or diverges but not to 00 or oo Alternating Series Tests n h term test for divergence o If an doesn t approach 0 then the series diverges The partial sums oscillate but are not damped and hence do not approach a limit If the series converges then an gt0 If an does approach zero then the alternating series may converge or may diverge More testing is necessary If the series diverges then an may or may not approach 0 Alternating series test Consider the alternating series 2 an 1 1 n1 between 0 and a1 Furthermore if the last term of a subtotal involves addition then the subtotal is greater that S if the last term of a subtotal involves subtraction then the subtotal is less than S In either case if only the rst n terms are used then the error the difference between the subtotal Sn and the series sum S is less than the rst term not considered In other words lS Snl lt an1 Suppose an gt0 Then the series converges to a sum S Absolute convergence Another way to test an alternating series is to remove the alternating signs and test the positive series If it converges then the alternating series also converges Conditional convergence If Elan l diverges it is still possible for San to converge In this case Eaquot is called conditionally convergent Power series a0 alx azx2 a3x3 a4x4 Sometimes used to create a new function when elementary functions are inadequate for example to solve an ode That is assume a power series form for the dependent variable Solve the resulting algebric equations to satisfy the ode and de ne the coef cients a The resulting series solution essentially de nes a new function Many advanced functions originated this way Caution The new function may converge for only a limited interval you must tests for convergence 53 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Power series representations of elementary functions15 It is also useful to have power series expansions for old functions Polynomials are easy to work with and representing an old function as an in nite polynomial is often convenient Consider a few examples of power series expansions of simple functions The derivation not given of these examples depends on finding a connection between the desired function x and a known expansion Example Consider rst the following power series which is also a geometric series 1 1 lxx2x3x4 forlltxltl 1 x Binomial series 1xq ammwx2 Wx3 for1ltxltl 4 Another example this one of an alternating series 2 3 4 5 lnlxx x x x x forlltxltl 10 2 3 4 5 Maclaurin Series We seek a less arbitrary approach to nding a series representation of a function Given the power series fx a0 alx 612x2 613x3 614x4 A Maclaurin series has coef cients 1 0 an 2 f n It can be shown that there are two possibilities Either f has no power series of this form ie with these coef cients or fxampampxampx2fm0x3 0 1 2 3 This expression can be used to nd power series representations of lots of elementary functions Here are some typical results 15 See standard math tables for a listing of various power series representations and their interval of convergence 54 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology 3 5 7 x x x smxx forallx 3 3 5 7 2 4 5 x x x cosxl for allx 4 2 4 6 2 3 4 x x x expxe lx forallx 5 2 3 4 Taylor series introduction The Taylor Series approach is used more often by hydrologists than any other It is fundamental to developing conservation models for mass momentum and energy to various solution methods including the finite difference method and to making extrapolations and predictions Its fundamental feature is that it provides an error estimate for its approximations Here we rst use it to derive the value of e In the next section we introduce the Taylor Series as it is familiar to hydrologists Suppose we set xl in the power series for ex Then elliiim 1 2 3 4 We can approximate e by a partial sum of the series but since the series does not alternate we don t have an error bound How can we introduce an error bound for the Maclaurin series and use it for this special case Suppose that x is xed and x is approximated by the beginning of its Maclaurin series that is by a Maclaurin polynomial say of degree 8 x8 0 3 8 fx x 0 x2 fm0 x3 f80 If the series alternates then the rst term omitted the 911 term in the series in this example supplies the error bound But whether or not the series alternates the error in the approximation can be 9 M 9 bounded as follows Consider all possible values of for m between 0 and x and find the maximum of the values Taylor s remainder formula states that the error in absolute value is less than or equal to that maximum In general the error in absolute value in approximating x by its Maclaurin polynomial of degree n is less than or equal to the maximum value of n1 f m x 11 1 2 New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology for m between 0 and x Returning to the problem of approximating e we can use a graphical method not shown here to get a crude estimate which we then re ne with Taylor approach The graphical approach based on integrating lx yields the estimate that 1 lt e lt 4 Now suppose we add the rst ve terms 1 to get e11iiiz708 3 2 3 4 To estimate the error of this approximation consider 2 with x ex x 1 n 4 since we added terms through x4 in the series for ex and 0 S m S 1 Then f 5x ex and em 5 f 5m 5 5 Since 1 lt e lt 4 the maximum occurs when m1 and that maximum is less than 45 or 130 Therefore the approximation in 3 is less than 130 Furthermore when the expansion in 1 stops somewhere all the terms omitted are positive so the approximation in 3 is an underestimate By adding more terms it can be shown that 2718281 lt e lt 2718282 Taylor Series in powers of xb Certain basic functions like In x lx and 1x can t be expressed as a power series of the form Za xquot because they have derivatives that blow up at x0 Other functions which have a power series form converge too slowly These limitations can be overcome by considering a power series of the form Zanx bquot a0 a1x ba2x b2 a3x b3 1 n0 called a power series about b The previous section consider the special case for b 0 For this more general case the Maclaurin series has coef cients a f Wb n If f does not blow up or have derivatives which blow up at b it has the power series representation 1 39b H b 2 b 3 fx f1x b f2x b f 3f x b 2 which is called a Taylor series for f about b The partial sums of 2 are called Taylor polynomials Graphs of successive Taylor polynomials are a line a parabola a cubic and so on tangent to the graph of x at point b b They supply better and better approximations to the graph The Taylor series converges more rapidly if x is near b and more slowly if x is far away In application there is a trade off keep x b small and use a only a couple of terms in 2 or increase x b and use more terms New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Application In the nite difference method of solving a differential equation for heat transport the temperature T at location x is related to the temperature at location bx Ax where Ax is the spacing of adjacent nite difference node points at which temperature is to be calculated Then with x bAx we can write 2 as T x Ax gal T 1 1 Tx dx OAx2 xrAx where the higher order terms have been truncated and the order of their approximation indicated by the last term on the RHS Solving for the temperature gradient we have dT T T Ax x x MOW dx 7 Ax which is then used to approximate the gradient in Fourier s law of heat conduction and to provide an estimate of the error in the approximation Similar nite difference approximations are used for solute diffusion and dispersion groundwater ow and other gradient driven processes New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology time changing BC Characteristics vxt t 0 xxo0 gt Vector form of PDEs Whenever PDEs are applied to problems involving more than one space dimension that is with more than one independent variable in space they are often written in vector form Let s use x y2 to represent a Cartesian coordinate system with unit direction vectors i j k This coordinate system is used to represent three space dimensions with three independent variables in space First some review a little vector calculus The del operator is de ned by Viiijik 6x 6y 62 We can apply it to a scalar to yield the gradient of the scalar which is itself a vector Vf gradfiiijik 6x 6y 62 In hydrology examples of scalar f are elevation pressure head concentration and temperature and the gradient of these variables describes their slopes in each of the coordinate directions We can also apply via a dot product the del operator to a vector say 11 to yield the divergence of that vector which is itself a scalar Vuzdivuz a Jr Jra W 6x 6y 62 where the components of vector u are u v w In hydrology examples of u are uid velocity groundwater specific discharge and various other advective and diffusive uxes and their divergence is used to describe how they change in space The divergence of the gradient operator say Vf is another dot product again yielding a scalar l82 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology I 2 62 62 62 VVfd1VVfVf 6x By 62 We know V2 by its name the LaPlace operator or LaPlacian Recall equations 68 on p 169 of these notes Let s rewrite them in vector form mostly using the gradient and LaPlace operators insomuch as these equations have only one scalar dependent variable The 3D LaPlace equation for scalar uxyz is flu flu zu 6x2 Byz 622 Vzu 0 6 A 2D advectiondiffusion equation for scalar ux y t is Z Z Z a v6 vy 61 1 a 121 2ny 6 DW 6 1 6t 6x 6y 6x 6x6 6y 7 Bu at VVWu VW DW un 0 13 where Vy 1s a 2D veloc y vector vvxvy and D w 1s a 2x2 second rank symmetrlc tensor Du ny Dryy D D where nyDyx yr yy Note the subscript x y on the del operator the velocity vector and the diffusion coef cient tensor This is used to indicate that the domain has only two spatial dimensions and that they are x y In practlce 1t 1s enough to say that the doma1n 1s twod1mens1onal and s1mply wrlte vvu VDVu 0 7 13 Simply think of a second rank tensor as a matrix Then eg DVu is an inner product of a matrix D and a vector u 14 Notice that the diffusion coefficient tensor is written inside the divergence operator but in the original form of 7 diffusion coefficients in various directions are written term by term outside the derivatives implying that the D s are constants in space This is a result of the compact vector notation It would be notationally incorrect to move the D outside the divergence operator in the vector form This makes the vector form of 7 a little less descriptive of the modeled situation What if there were no directional aspect to D so that it was simply a scalar D Then if it were constant homogeneous in space it would be written outside the divergence operator leading to a LaPlacian See equation 8 for an example l83 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology The 3D heatconduction equation uxyzt 2 2 2 6 quot 6a 6 a u DV2u0 8 6x By 62 it In all three examples 6 8 notice how compact the vector equations Vzu 0 2 VVu VDVu0 and DV2u 0 Are compared to their full blown versions This is one reason for using vector notation But the rules of vector calculus are another for they provide convenient tools for deriving and manipulations these equations and their solutions What would happen if the dependent variable were a vector An example is velocity 11 using the notation given earlier 11 u v w In uid mechanics there are several commonly encountered vector conservation equations Examples include conservation of uid mass and conservation of momentum In threespace each of these vector equations represents three different conservation equations one each for velocity in each direction Conservation of uid mass for a compressible uid is given by 6p V u0 at p where p is uid density a fourth dependent variable While conservation of uid mass for an incompressible uid is the zero divergence equation Vu0 Conseration of uid momentum Newton s second law for an incompressible viscous uid is uVu th inUV2u 6t p a b c d e where v kinematic viscosity g gravitational acceleration and h elevation above a datum Here the lefthandside represents the rate of change of momentum mass times acceleration while the righthandside represents forces In particular a represents the time rate of change of momentum and b represents the spatial rate of change of momentum On the right 0 represents gravitational body forces d is pressure forces and e represents viscous forces 184 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology As an exercise you should try to write out each of these vector conservation equations without using vector notation Linearity of PDEs Recall our previous discussion of linearity p 60 of these notes There are tremendous advantages of a linear model in deriving and applying solutions For example if we have a linear model then we can scale or convolute the model result to represent a new forcing that is a new solution without having to resolve the equation If we have a linear model we can use certain solution methods that take advantage of linearity such as LaPlace or Fourier transform methods Even if the model is nonlinear if the nonlinearity is mild we might be able to linearize approximate the model and still take advantage of linearity Etc You should also recall that there are rules for determining linearity Letting L be an operator u and v represent unknowns and a and b constants these are a Lau aLu b Lu v Lu Lv c Lau bv aLu bLv In the case of PDEs the operatorL is that of a PDE operator For example the PDE Bu Bu zu 6t 6x 6x2 f XJ where v D and f are known parameters or forcings has as an operator 2 Lozwwwwa 2 6t 6x 6x This example PDE can then be rewritten as M xl and used for various purposes including testing for linearity Indeed many x t PDEs with a scalar unknown can be written in this general way The supplemental reading from Celia and Gray 1992 discusses linearity principles for PDEs Here are several example PDEs Which ones are linear and which are nonlinear and why The dependent variable is scalar u or vector 11 and the independent variables are x yz and t or some combination of them Assume that parameters like diffusion coef cient D are constant unless a dependence is indicated by parenthesis eg Dx or Du Here v C D 1 p and g are scalar parameters and V and D are vectortensor parameters l85 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology a v D 0 bCu Dv2uo 6 Bu 6 Bu flu flu D D 0 d 2 0 6x 96 Wax ay 96 Way 6x2 ayz fxyu e uVu th inuV2u f 2 VVu VDuVu 0 p Domain Issues The time and space domain over which a PDE applies is critical As we saw above most of our PDEs that involve time are rst order in time and require an IC Our PDEs that involve space and that s basically every PDE that you will encounter involve equations that are usually second order in space and also possibly rst order in space If second order they require two BCs for each spatial dimension Each dimension the timespace domain can be nite semiin nite or in nite Most time domains that you will work with are semiin nite progressing from an IV 00 at say time F0 to in nite time You may choose to stop at a particular time as we future often did with lSt order ODEs but in principle you could continue to solve until I approaches in nity We can represent the IV problem graphically as an arrow shown 0 to the right Many space domains we will work with will be finite in size bounded between two sides In one space dimension with coordinate x these sides can be located at positions a and b such that the domain is described by a 5 x 5 b We can represent this BV problem graphically by the closed domain shown in the sketch x a This is the domain we worked with in solving 2quotd order ODE BVPs If we put these together for a onedimensional diffusion problem eqn 21 on p 178 6u flu 6t 6x2 the domain is like depicted on p 180 or as shown in the sketch on the right There are other unbounded spatial domains that are commonly encountered For example imagine the Darcy ow of water from a stream into the bounding porous bank This bank storage process is modeled by a onedimensional diffusion equation where the hydraulic diffusion coef cient D is the aquifer transmissivity divided by speci c yield and the unknown u is the water table elevation above the initial head The model is semiinfinite in space bounded on one side say at l86 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology xa by the stream but unbounded on the other side so that the aquifer extends to in nity In short it is assumed that b gtoo This type of semi a in nite model in space is fairly common For example it is used in the model of well hydraulics known as the Theis model The sketch on the right depicts the space domain for this case Another possibility is that the space domain is unbounded on both sides So that you are examining a portion of the real world by assuming that there are no nearby boundaries to interfere This conceptual model is H typical in contaminant transport models which often look at conditions x 3900 close to a source area but ignore far eld in uences This space domain is pictured on the right Below we depict the entire x t solution domain for both cases semiin nite in space on the left and in nite in space on the right Curiously it is often easier to derive a solution for these cases than for the nite domain case explaining their common use to approximate reality For example in nite domains it is common that analytical solutions be expressed by in nite series which must often be approximated eg by truncating the series or nding an asymptotic approximation Solutions for semiin nite and in nite domains are usually closed form xa 00 x For example the solution for the semiin nite streambank storage problem outlined above is an error function uxt H erfcx4Dt where H is the flood stage in the stream If instead the aquifer is of nite width the solution for bank storage is an in nite series of sines and cosines Similarly the Theis well function for drawdown due to pumping from an in nite confined aquifer is an exponential integral while the ow eld for the nite Tothian aquifer of regional groundwater ow is again an in nite series of sines and cosines Proper Mathematical Statement Before we attempt to solve PDEs we need to express our model in a proper mathematical statement You should know the elements of this statement because you will often need to employ it in future studies and in practice as a professional Such a statement describes l The domain geometry and appropriate convenient coordinate system usually including a sketch 2 The independent and dependent variables 3 The governing partial differential equations the PDE l87 New Mexico Tech Hydrology Program 4 6 Hyd 5 Quantitative Methods in Hydrology The initial and boundary conditions as needed both in type e g 151 2nd and 3rd type location and value The IC and BCs The parameters and properties whether completely prescribed or shown as functions of independent and dependent variables Any other requirements Example 1 An example using the 2D steady state heat conduction problem in a plate is l N 4 The domain is a 2D rectangle of dimensions L by Ly with x y Cartesian coordinates as shown in the sketch Lx BCl The independent variables y are space coordinates x y and dependent variable is temperature T x BC3 Sketch of domain for heat conduction in a 2D plate The governing partial differential equation PDE is the LaPlace equation an elliptic partial differential equation PDE 27 There is no initial condition The problem is steady state unless a BC changes There are two Dircihlet lst type boundary conditions at the top yLy and bottom y0 these are repectively BCs 1 and 3 in the sketch There are two zerogradient 2quotd type Neumann boundary conditions on the right and left these are respectively BCs 2 and 4 in the sketch BCl TxLy Ta 0 g x Lx y Ly 28a BC2 aTax0 x00yLy 28b BC3 Tx0 T1 0 g x Lx y 0 28c BC4 aTax0 xLx0 y Ly 28d where Ta and Tb are prescribed temperature values They could each vary with x or be constants l88 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology 5 The only parameters in this problem are the values of Ta and Tb along their respective Dirichlet boundaries and the value of zero for the normal gradient along the Neumann boundaries The thermal conductivity is spatially uniform and because there is no source or sink as in a Poisson Problem it drops out and doesn t effect the solution for T 6 Any other requirements Suppose you take the solution for T and then compute heat ux due to conduction through the domain You will also need the value for thermal conductivity K to apply Fourier s Law to yield the conductive ux which has components qx K aTax and qy K aTay 29 homologous to Darcy s Law15 I ve elaborated the description for these notes We can usually write this kind of statement more concisely Example 2 A more concise example using the paraboliclD transient heat diffusion mixed IVBV problem is Consider the 1D spatial domain shown in the sketch with length L and and Cartesian coordinate x with origin on the left end of the x 0 x I L domain The dependent variable temperature Txt varies with space x and time t The governing equation boundary conditions and Domam for 1D heat dlffuswn39 initials conditions are PDE 6 T aZT 30 6t 6x2 1C Tx0 7300 31 BCl TL t TL t 32a BC2 aTaxl OJ 0 32b where I ve imposed a lst type BC on the right and a zerogradient 2quotd type BC on the left I ve assumed that the prescribed boundary temperature at xL could change with time and that the initial condition could vary with space The parameters are the thermal diffusivity D the initial temperature T1 and the boundary temperature TL at xL The diffusivity is assumed constant If there are ancillary calculations for conductive ux qx K aTax the thermal conductivity K CD is also needed where c is the appropriate heat capacity 15 It so happens in this problem that if Ta and Tb are constants then due to symmetry we can already tell that qx 0 without having to formally solve the problem l89 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology Solution Methods Depending on its classi cation and behavior there are a variety of tools used to solve a PDE The tool of rst resort for analytical solutions is almost always Separation of Variables SOV resulting in two or more ODEs that can be solved by standard methods Many other analytical methods also reduce the PDE to ODEs assume a form of the solution based on prior experience with the behavior of similar PDEs or take an approach unique to that class of PDE The most exible tool involves numerical solutions in which one or more of the continuous independent variables is replaced by discrete node points and approximations are used to interrelate the values of dependent variables at these points Insomuch as the solution method can depend on the type of PDE we ll start by examining solutions for one type of equation then expand to solve others We ll start with the parabolic heatconduction PDE using the heat conduction example given above in equations 3032 We ll focus on analytical methods using Crank s 1975 book on the Mathematics of Diffusion for details excerpts on the class web site and numerical methods using the nite difference method We ll start with numerical methods since you are already familiar with them Numerical nite difference solution Let s apply a nite differenceinspace solution approach to 30 6T 62 D 2 6t 6x 30 In this approach we approximate the spatial second derivative using the nite differences resulting in a set of simultaneous lst order ordinary differential equations in continuous time I one for each node point of the spatial discretization We discussed this kind of problem on pp 164166 of these notes Let s review that information in the present context Discretization in space Once we discretize 30 in space we get a matrix ordinary differential equation Y Ayg 33 where y T1 T2 T3 TN1 TNT is a column vector of the nodal approximation of temperature N is the number of spatial node points y dydt A is a conductivity matrix of thermal conduction connections between nodes as on pp 143 and 151 of these notes and g is an appropriate load vector A and g should also include appropriate modi cations pp 145 148 to account for boundary conditions 0 O O O O O O node 1 2 3 4 N l N x 0 L Spatially discretized domain for 1D heat diffusion l90 New Mexico Tech Hyd 5 Hydrology Program Quantitative Methods in Hydrology We use uniform nodal spacing Note that there is no rst derivative in space or 1St order source sink term one proportional to T in 30 then we can use the results on p 143 by noting that on those pages the equivalent is pq0 For an internal node n not near a boundary we have D Clam E anquot D 0mm 340 where the coef cient in the second derivative term D has been included Later we should take advantage that D and Ax are constant yielding a FDM template for the second derivative term of the form Dsz1 2 1 and a tridiagonal conductivity matrix A of the same form Before accounting for boundary conditions the load vector g is null a vector of zeros as there are no sources or sinks Accounting for BC1 at xL a rst type boundary partitions out row N but doesn t change the conductivity matrix entries for row N l see p 145 of the notes It does however add the value aNN1TLt Dsz TLC to vector g in row N l see p 145 note change in sign due to g here and b on p 142 having opposite signs Accounting for the zerogradient second type boundary condition at node 1 doesn t change g but it does modify the matrix A in row 1 so that a1 2 Dsz is replaced by 2Dsz to account for re ection at the zero gradient boundary see p 146 Consequently matrix A and vector g have N l rows Rows 2 through N l of matrix A have entries as shown in 34 In row 1 the value of all is altered and replaced by 2Dsz Rows 1 through N 2 of vector g have values of zero Row N l has a value of Dsz TLC In the nite difference version of this LaPlace equation with the only Neumann boundaries being zero gradient the term Dsz occurs in all terms We can simplify the nite difference equation by dividing through by this common scalar term This includes dividing the accumulation y term The new matrix equation is mlD y Ayg 35 where the superscript represents the new conductivity matrix and load vector with 6111 2 612 2 gquot 0 n 1 ann1 1 an 2 Mm 1 gquot 0 n 2 3 4 N 2 36 61N 1N 2 1 61N 1N 1 2 gNI TLC nN 1 Discretization in time Let s use a discrete backward Euler method following the guidance on pp 165 of these notes or New Mexico Tech Hyd 510 Hydrology Program Quantitative Methods in Hydrology Ax FleAtkA m S yk Atk gm 37 where the subscript k represents the time step A doesn t change with time so it doesn t have a subscript but since T L can change with time g does have subscript Note the coef cient of the identity matrix due to the earlier division by the common factor DAx2 We can now rewrite this in terms of a global coef cient matrix G and global load vector f G Yk fk 38 2 G 17AtkA 39 D fk yk Ark go 40 We first assemble Aquot 36 which doesn t change over time If the time step doesn t change we can also assemble a nonchanging G 38 Then at each time step we assemble f 40 and if time step changes G We then solve 38 at each time step advance the time and repeat until the prescribed stopping time is reached This Euler method being a fully implicit procedure see pp 105106 of these notes is unconditionally stable in time References on analytical solutions to diffusion problems For examples of analytical solution methods for various versions of the parabolic heat conduction equation and some solutions of the elliptic steady state diffusion equation see the classic reference THE MATHEMATICS OF DIFFUSION J mum 15175 the 2 01 edition from Oxford University Press Another classic reference from the same publisher is Carslaw and Jaegger s Heat Conduction in Solids 1959 Both books are republished every couple of years A related reference frequently used by hydrologists is Bird Stewart and Lightfood T ransportPhenomema 2 01 Ed Finally a book on the fundamental physics of mass diffusion is EL Cussler s Di fsion Mass Transfer in Fluid Systems Cambridge Press 1997 We ll examine excerpts from Crank s book which are posted to the web site


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.