Math 2250 Maple Project 2: Newton Cooling January 2009

Similar documents
inside temperatures u(t)

1.5 Application Linear Equations and Temperature Oscillations

2.5 Linear Applications 99 Two-Tank Mixing. Two tanks A and B are assumed to contain A 0 and B 0 liters of brine at t = 0. Let the input for the rst t

2.5 Linear Applications

Exponential Functions Dr. Laura J. Pyzdrowski

2.3 Linear Equations 69

Math 122 Fall Handout 15: Review Problems for the Cumulative Final Exam

Math 215/255 Final Exam (Dec 2005)

Students should read Sections of Rogawski's Calculus [1] for a detailed discussion of the material presented in this section.

Homework Solutions: , plus Substitutions

This is the number of cycles per unit time, and its units are, for example,

University of Connecticut Department of Mathematics

1. (10 points) Find the general solution to the following second-order differential equation:

Maple for Math Majors. 3. Solving Equations

Lecture Notes for Math 251: ODE and PDE. Lecture 16: 3.8 Forced Vibrations Without Damping

Differential Equations 2280 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 2015 at 12:50pm

Math 2250 Maple Project 2, March Tacoma Narrows. CLASSTIME VERSION A-E, F-K, L-R, S-Z

Differential Equations

Ordinary Differential Equations (ODEs)

4. Sinusoidal solutions

Semester Project Part 1: Due March 1, 2019

20D - Homework Assignment 1

Driven Harmonic Oscillator

Higher Order Linear ODEs

1.1 GRAPHS AND LINEAR FUNCTIONS

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

EXAM # 3 PLEASE SHOW ALL WORK!

3. Solutions of first order linear ODEs

Math 315: Differential Equations Lecture Notes Patrick Torres

Laboratory 10 Forced Equations and Resonance

ENGI Second Order Linear ODEs Page Second Order Linear Ordinary Differential Equations

Suppose we have the set of all real numbers, R, and two operations, +, and *. Then the following are assumed to be true.

y 2y = 4 x, Name Form Solution method

Worksheet Week 1 Review of Chapter 5, from Definition of integral to Substitution method

First Order Differential Equations

VANDERBILT UNIVERSITY. MATH 2300 MULTIVARIABLE CALCULUS Practice Test 1 Solutions

Math Week 1 notes

Purdue University Study Guide for MA Credit Exam

Maple in Differential Equations

NEWTON S LAW OF COOLING

Higher Order Linear ODEs

Q ( q(m, t 0 ) n) S t.

HOMEWORK # 3 SOLUTIONS

Second-Order Linear ODEs

Your exam contains 5 problems. The entire exam is worth 70 points. Your exam should contain 6 pages; please make sure you have a complete exam.

Math 115 First Midterm October 9, 2017

MATH The Derivative as a Function - Section 3.2. The derivative of f is the function. f x h f x. f x lim

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics. The Basics of Linear Algebra

Applications of integrals

MATH 213 Linear Algebra and Ordinary Differential Equations Spring 2015 Study Sheet for Final Exam. Topics

Partial Differential Equations Summary

It is convenient to think that solutions of differential equations consist of a family of functions (just like indefinite integrals ).

Forced Mechanical Vibrations

Elementary Differential Equations

Chapter 3 Higher Order Linear ODEs

This is. BC Calculus Review

Math 308 Exam I Practice Problems

AP Calculus AB - Course Outline

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

p(t)dt a p(τ)dτ , c R.

Math Assignment 5

MATH 1231 MATHEMATICS 1B Calculus Section 3A: - First order ODEs.

First order differential equations

Math 3313: Differential Equations First-order ordinary differential equations

Definition of differential equations and their classification. Methods of solution of first-order differential equations

Notes on the Periodically Forced Harmonic Oscillator

THE USE OF CALCULATORS, BOOKS, NOTES ETC. DURING THIS EXAMINATION IS PROHIBITED. Do not write in the blanks below. 1. (5) 7. (12) 2. (5) 8.

Ordinary Differential Equations

Logarithms Dr. Laura J. Pyzdrowski

ADVANCED PROGRAMME MATHEMATICS: PAPER I MODULE 1: CALCULUS AND ALGEBRA

Second Order Linear ODEs, Part II

1 Wyner PreCalculus Fall 2013

AP Calculus AB Syllabus

Math 103 Midterm Test 1 Feb. 10, min.

Topic 2 Notes Jeremy Orloff

The AP exams will ask you to find derivatives using the various techniques and rules including

Math 216 Second Midterm 19 March, 2018

Mathematics Qualifying Exam Study Material

Introduction to First Order Equations Sections

A-LEVEL Mathematics. Paper 1 Mark scheme. Specimen. Version 1.2

x 3x 1 if x 3 On problems 8 9, use the definition of continuity to find the values of k and/or m that will make the function continuous everywhere.

Chapter 1, Section 1.2, Example 9 (page 13) and Exercise 29 (page 15). Use the Uniqueness Tool. Select the option ẋ = x

3.3. SYSTEMS OF ODES 1. y 0 " 2y" y 0 + 2y = x1. x2 x3. x = y(t) = c 1 e t + c 2 e t + c 3 e 2t. _x = A x + f; x(0) = x 0.

Math 240 Calculus III

Math 308, Sections 301, 302, Summer 2008 Lecture 5. 06/6/2008

Using a graphic display calculator

Problem Point Value Points

18.01 Calculus Jason Starr Fall 2005

Lecture 6: Differential Equations Describing Vibrations

A: Brief Review of Ordinary Differential Equations

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor.

Part A: Short Answer Questions

The Theory of Second Order Linear Differential Equations 1 Michael C. Sullivan Math Department Southern Illinois University

First and Second Order ODEs

University of Connecticut Department of Mathematics

Let's begin by evaluating several limits. sqrt x 2 C4 K2. limit. x 2, x = 0 ; O limit. 1K cos t t. , t = 0 ; 1C 1 n. limit. 6 x 3 C5.

2. Second-order Linear Ordinary Differential Equations

Written examination 2

Calculus is Cool. Math 160 Calculus for Physical Scientists I Exam 1 September 18, 2014, 5:00-6:50 pm. NAME: Instructor: Time your class meets:

Transcription:

Name Class Time Math 2250 Maple Project 2: Newton Cooling January 2009 Due date: See the internet due dates. References: Edwards-Penney, pages 55 57. Code in maple appears in 2250mapleL2-S2009a.txt at URL http://www.math.utah.edu/~gustafso/. This document: 2250mapleL2-S2009a.pdf. The Problem and Model. The project is to determine an approximation for the indoor temperature u(t) in an unheated building. The model uses Newton s cooling law, insulation data k and a formula for the ambient outside temperature A(t) (see the background section infra): (1) u (t) + ku(t) = ka(t), u(0) = u 0. Assumptions and Notation. Let the daily temperature in Salt Lake City vary from a low of m = 21 degrees to a high of M = 49 degrees with the low and high at 3am and 3pm, respectively. The building is assumed insulated, the average insulation factor being represented by a Newton cooling constant k, usually 0.2 k 0.5. The ambient outside temperature is called A(t) and the inside temperature is called u(t), where t is in hours measured from midnight t = 0. The number u 0 is the temperature at midnight. The model assumes that no heat sources or heat sinks are present inside the building. Symbol u h (t) refers to the general solution of the homogeneous equation u + ku = 0. Symbol u p (t) stands for a particular solution of u + ku = ka(t). Background Newton Cooling Model. Newton s law of cooling is: The rate of change of the indoor temperature is proportional to the difference between the ambient and indoor temperatures. The cooling law implies that du/dt is proportional to A u. Let A(t) be the ambient outside temperature and let k denote the proportionality constant in Newton s cooling law. A model for the indoor temperature u(t) is given by du/dt = k(a u), u(0) = u 0, which can be rearranged as (2) u (t) + ku(t) = ka(t), u(0) = u 0. The number k is called the insulation constant. Ambient Temperature Model. Let M = 49, m = 21, ω 0 = π/12. The ambient temperature formula below satisfies M = max A(t) = A(15), m = min A(t) = A(3) and A(t) is t-periodic of period 24 hours. A(t) = 1 2 (M + m) 1 2 (M m)cosω 0(t 3) = 35 14 cosω 0 (t 3) For use in maple, a function of two variables is used to maintain the variable name ω in displays. AA(t, ω) = 35 14 cosω(t 3)

Indoor Temperature u(t). The integrating factor method for linear equations u + p(t)u = q(t) [Edwards-Penney Section 1.5] applies to find the general solution by these steps: u + ku = ka(t) Copy the differential equation. The integrating factor is e kt. (e kt u) e kt = ka(t) Integrating factor method. (e kt u) = ka(t)e kt Clear fractions. e kt u = u 0 + t 0 ka(x)ekx dx Integrate both sides with respect to t. Apply the Fundamental Theorem of Calculus. Use u(0) = u 0. u = u 0 e kt + e kt t 0 ka(x)ekx dx Divide to isolate the explicit solution u. Let u h (t) = u 0 e kt, a solution of the homogeneous differential equation u + ku = 0. Let u p (t) = ke kt t 0 ekx A(x)dx, a particular solution of the nonhomogeneous differential equation u + ku = ka(t). Then the indoor temperature u = u h + u p depends on the time t, the initial temperature u 0, the insulation constant k and the frequency ω (fixed at ω 0 = π/12). Write u = u(t, u 0, k, ω) to emphasize the dependence. In maple, advantages exist for adding the variable name ω, which is later set to value ω 0 = π/12. Write u as U(t,u0,k,omega) for use in maple. Steady-state solution. The steady-state solution uss is an expression obtained from the general solution formula u = u h +u p by dropping all terms containing a negative exponential. It depends on t, k and ω. This expression is known to be a solution of the differential equation, independent of any arbitrary constants, which represents the observed temperature after a long time. In short, uss is independent of u 0. Theory provides the following result. Theorem (Unique Periodic Solution) Assume p 0 is a constant and q(x) is continuous and T-periodic [q(x + T) = q(x)]. Then the differential equation dy + py = q(x) has a unique T-periodic solution y(x) given dx by the initial value y(0) = ( e pt 1 ) T 1 e pt q(t)dt. 0 2

Problem L2.1. (Solution Formulas for u p and u) Derive by hand, using maple assist for values of integrals, an explicit symbolic formula for u p (t). Display a final formula for u = u h + u p which depends only on t, u 0, k and ω. Check your hand answer for u in maple. The only maple assist in this problem is maple integration and the maple answer check. Problem L2.2. (Steady-State Periodic Solution) Derive by hand a formula for the steady-state periodic solution uss of u + ku = ka(t). There is no maple assist in this problem, it is all done by hand from the answer in L2.1. The results: uss(t) = 35 14k (k cosω k 2 +ω0 2 0 (t 3) + ω 0 sinω 0 (t 3)), u(t) = Ce kt + uss(t), C = u 0 uss(0). Problem L2.3. (Indoor-Outdoor Variation) Compare in a maple graphic oscillations of the indoor temperature u(t) and the outdoor temperature A(t) over a 48-hour period assuming k = 0.32, u 0 = 74, ω = π/12. Include in the plot four horizontal lines for the maximum and minimum temperatures for each of u(t) and A(t). Report the indoor and outdoor temperature variations from this 48-hour plot (max minus min in each case). Report the time delay between the indoor and outdoor temperatures, using this same plot. Problem L2.4. (Freezing Pipes) Assume ω = π/12 and the insulation constant k ranges from 0.2 to 0.48. Suppose the inside temperature is 76 degrees at midnight when the furnace is turned off. Report approximate ranges of hours and insulation constants, during the first 72 hours and 0.2 < k < 0.48, for which the indoor temperature is at or below 30 degrees. Justify your logic used to find the ranges, in a short paragraph. Illustrate with a computer graphic. Staple this page on top of all hand and maple work. Sample maple code, problem notes and background are on the next page... 3

Problem Notes Notes on L2.1 A derivation by hand is expected, which parallels the derivation above, giving a formula for u h and a formula for u p. Integration for the u p formula is referenced to an attached maple worksheet appendix. The answer check references a second attached worksheet. Because many students want to know how to do the integration, based upon a calculus background, more information is provided here. The integration problem can be solved by hand using the book s integral table: t u p (t) = ke kt e kx (35 14 cos(ω(x 3)))dx. 0 A change of variable u = x 3 allows use of integral table entry e au cos(bu)du. The symbol ω will be set to π/12, but for simplicity, use symbol ω throughout. You are asked to use maple. Its table lookup method is superior to the hand method above, in that no change of variable is required to obtain the answer. This method is accurate and avoids primary pitfalls in using a book table. A coding example appears below, which moves the factor ke kt inside the integrand, in order to automatically perform simplifications. # maple integral table lookup unassign( k, omega, t, x ); integrand:=(35-14*cos(omega*(x-3)))*k*exp(k*x-k*t); F:=unapply(integrand,(x,t,k,omega)); int(f(x,t,k,omega),x=0..t); The formulas for u h and u p are used again in L2.2 in order to derive the steady-state solution. Your answer must contain symbols t, u0, k, omega. The answer check in maple is organized as follows. The complications of setting ω = π/12 are avoided here by leaving ω as a symbol, since it does not affect the answer check. # Test LHS=RHS for u +ku=ka. unassign( t, u0, omega, k ): uh:=u0*exp(-k*t): up:=(explicit answer from L2.1): myans:=uh+up: LHS:=diff(myANS,t)+k*myANS: RHS:=k*(35-14*cos(omega*(t-3))): simplify(expand(lhs-rhs)); A successful test of LHS = RHS produces answer zero, or an expression that reduces to zero. Notes on L2.2 The steady-state solution is derived from the hand-generated symbolic solution u = u h + u p in L2.1 by dropping all terms that contain the negative exponential factor e kt. The answer, where ω 0 = π/12: uss = 35 14k k 2 + ω0 2 (k cosω 0 (t 3) + ω 0 sin ω 0 (t 3)). To check your answer, compare it against the formula displayed in L2.2. To get maple to report the above formula, it is essential to evaluate everything with ω as a symbol, to wit, use in maple the statement unassign( omega ):. Beware of writing omega:=pi/12, which defines ω to be a constant, unless you undo the effect immediately afterward. Maple s unassign can be used to erase assignments. Maple is unable to evaluate limit(exp(-k*t),t=infinity) as zero, because the expression contains k, an unevaluated symbol. This is why you are asked to report the steady-state solution manually, by dropping terms from previously obtained answers. 4

Notes on L2.3 The outside temperature A(t) (AA(t,omega) in maple) and the solution u = U(t, u 0, k, ω) obtained in L2.2 can be coded in maple as follows: unassign( t, u0, k, omega ): AA:=unapply(35-14*cos(omega*(t-3)),(t,omega)); uss:=35-(14*k/(k^2+omega^2))*(k*cos(omega*(t-3))+omega*sin(omega*(t-3))): uss0:=subs(t=0,uss); U:=unapply((u0-uss0)*exp(-k*t)+uss,(t,u0,k,omega)): The two curves plus a horizontal line u = 21 are placed onto the plot by this maple command: plot({u(t,76,0.32,pi/12),aa(t,pi/12),21},t=0..48); Missing curves? Probably, the missing curves are defined to contain an unevaluated variable name, like pi instead of Pi. While Pi is the constant 3.14159, lowercase symbol pi is a variable name: case is significant in maple. Curves vanish on the printer? Add color=black to the plot command, e.g., plot(sin(x),x=0..pi,color=black);. Click a mouse button on the high and low spots in the graphic. Somewhere on the maple worksheet the coordinates of the click are displayed (look around on the screen!). This method gives decimal approximations to the max and min values. Use the four values obtained to expand the list of horizontal lines to four lines. The final plot has six curves. The indoor temperature variation is just the maximum minus the minimum, as computed from the plot of u(t). Beware: u has a maximum at t = 0. The outdoor temperature variation is computed from the graph of A(t), which is trapped between two horizontal lines for its max and min. The time delay between the indoor and outdoor temperatures is computed as T 2 T 1, where A(T 1 ) = maxa(t) and u(t 2 ) = maxu(t). Look at the graphic to find sane answers for T 1 and T 2. See the textbook for a more complete discussion of the ideas. Beware: T 1 and T 2 are values for time in the first 72 hours (abscissa values, not ordinate values). The smallest time delay obtainable from the graphic is to be reported, because the transient solution Ce ht may affect the graph of u(t) = Ce ht + uss(t) for a few hours. Notes on L2.4 A computer algebra assist for this problem uses maple s function implicitplot. This function can plot the equation u(t, 76, k, π/12) = 30 over the domain 0 t 72, 0.2 k 0.48. From this plot, and the 3D-plot z = u(x, 76, y, π/12), the question is easily answered. with(plots): unassign( t, u0, k, omega ): uh:=u0*exp(-k*t): up:=(the answer from L2.1): myans:=uh+up: U:=unapply(myANS,(t,u0,k,omega)); implicitplot(u(t,76,k,pi/12)=30,t=0..72,k=0.2..0.48); plot3d({u(t,76,k,pi/12),30},t=0..72,k=0.2..0.48); The relation between the 2D implicit plot and the 3D plot is seen by slicing the 3D plot at height z = 30 to obtain a bread slice parallel to the xy-plane. The implicit plot depicts the bread slice by projecting it onto the xy-plane. The slice can be visualized in maple by grabbing the 3D graphic with the mouse, to perform a rotation, which exposes a view of the underside of the 3D figure. The normal 3D view has the axes reversed, so you should use the mouse tools to orient the 3D graphic to match the 2D bread slice. Zoom in on the implicit plot by using a smaller time domain, suggested by the larger plot. The zoom should narrow in on a range of k-values and t-values such that the 3D surface is entirely below the plane z = 30. This geometry detects freezing in the given range. Physically, inside temperature 30 degrees is reached a few hours after the outside temperature drops below 30 degrees. During 72 hours, there are three such inside temperature drops, verified from the 3D-plot, where z=temperature. For k < 0.32, inside temperature 30F is not reached in the first 23 hours. For 0.34 < k < 0.48, inside temperature 30 degrees is reached between 5.8 and 8.7 hours. Please report answers in this format: 5

No freezing 0-23 hours, 0.2 < k < 0.32, Freezing 5.8-8.7 hours for 0.34 < k < 0.48, Freezing 27.2-33.9 hours for 0.2 < k < 0.48. Use as many ranges as needed to describe the situation; between 3 and 7 will be required. An answer is correct if it is supported by the graphic. 6