DEplot(D(y)(x)=2*sin(x*y(x)),y(x),x=-2..2,[[y(1)=1]],y=-5..5)

Similar documents
Name: October 24, 2014 ID Number: Fall Midterm I. Number Total Points Points Obtained Total 40

Lecture Notes for Math 251: ODE and PDE. Lecture 6: 2.3 Modeling With First Order Equations

Homework 2 Solutions Math 307 Summer 17

Math 392 Exam 1 Solutions Fall (10 pts) Find the general solution to the differential equation dy dt = 1

Differential equations

Ordinary Differential Equations

Section 2.5 Mixing Problems. Key Terms: Tanks Mixing problems Input rate Output rate Volume rates Concentration

Three major steps in modeling: Construction of the Model Analysis of the Model Comparison with Experiment or Observation

Will Murray s Differential Equations, IV. Applications, modeling, and word problems1

MA 214 Calculus IV (Spring 2016) Section 2. Homework Assignment 2 Solutions

(a) x cos 3x dx We apply integration by parts. Take u = x, so that dv = cos 3x dx, v = 1 sin 3x, du = dx. Thus

Math 308 Exam I Practice Problems

MATH 294???? FINAL # 4 294UFQ4.tex Find the general solution y(x) of each of the following ODE's a) y 0 = cosecy

Modeling with First Order ODEs (cont). Existence and Uniqueness of Solutions to First Order Linear IVP. Second Order ODEs

First Order Differential Equations Chapter 1

Math Applied Differential Equations

MAT 311 Midterm #1 Show your work! 1. The existence and uniqueness theorem says that, given a point (x 0, y 0 ) the ODE. y = (1 x 2 y 2 ) 1/3

First Order ODEs, Part II

Math 308 Exam I Practice Problems

LECTURE 4-1 INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS

Do not write in this space. Problem Possible Score Number Points Total 48

Math 2Z03 - Tutorial # 3. Sept. 28th, 29th, 30th, 2015

Ch 2.3: Modeling with First Order Equations. Mathematical models characterize physical systems, often using differential equations.

DON T PANIC! If you get stuck, take a deep breath and go on to the next question. Come back to the question you left if you have time at the end.

Solutions to the Review Questions

Math 266, Midterm Exam 1

Math 2214 Solution Test 1D Spring 2015

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

Introduction to Differential Equations Math 286 X1 Fall 2009 Homework 2 Solutions

Solutions to the Review Questions

Math 116 Practice for Exam 2

Problem Set. Assignment #1. Math 3350, Spring Feb. 6, 2004 ANSWERS

Graded and supplementary homework, Math 2584, Section 4, Fall 2017

Review Problems for Exam 2

Math Spring 2014 Homework 2 solution

Sample Questions, Exam 1 Math 244 Spring 2007

MA26600 FINAL EXAM INSTRUCTIONS December 13, You must use a #2 pencil on the mark sense sheet (answer sheet).

HOMEWORK # 3 SOLUTIONS

Solutions x. Figure 1: g(x) x g(t)dt ; x 0,

Chapter 2 Notes, Kohler & Johnson 2e

Chapter 1: Introduction

MATH 251 Examination I October 8, 2015 FORM A. Name: Student Number: Section:

Do not write below here. Question Score Question Score Question Score

Math 2410Q - 10 Elementary Differential Equations Summer 2017 Midterm Exam Review Guide

Lesson 10 MA Nick Egbert

MATH 251 Examination I October 5, 2017 FORM A. Name: Student Number: Section:

Math 220 Final Exam Sample Problems December 12, Topics for Math Fall 2002

APPM 2360: Final Exam 10:30am 1:00pm, May 6, 2015.

dy x a. Sketch the slope field for the points: (1,±1), (2,±1), ( 1, ±1), and (0,±1).

Sect2.1. Any linear equation:

Compartmental Analysis

Pre-Calculus Section 12.4: Tangent Lines and Derivatives 1. Determine the interval on which the function in the graph below is decreasing.

ODE Math 3331 (Summer 2014) June 16, 2014

VANDERBILT UNIVERSITY. MATH 2610 ORDINARY DIFFERENTIAL EQUATIONS Practice for test 1 solutions

Math : Solutions to Assignment 10

Introduction to di erential equations

MATH 104 Practice Problems for Exam 2

Differential Equations

Problem Sheet 1.1 First order linear equations;

EXAM-1 -B4 MATH 261: Elementary Differential Equations MATH 261 FALL 2014 EXAMINATION COVER PAGE Professor Moseley

MATH 307 Introduction to Differential Equations Autumn 2017 Midterm Exam Monday November

Assignment # 3, Math 370, Fall 2018 SOLUTIONS:

2.4 Differences Between Linear and Nonlinear Equations 75

Modeling with first order equations (Sect. 2.3). The mathematical modeling of natural processes.

Math 122 Test 2. October 15, 2013

Chapters 8.1 & 8.2 Practice Problems

P (t) = rp (t) 22, 000, 000 = 20, 000, 000 e 10r = e 10r. ln( ) = 10r 10 ) 10. = r. 10 t. P (30) = 20, 000, 000 e

Form A. 1. Which of the following is a second-order, linear, homogenous differential equation? 2

Name Class. 5. Find the particular solution to given the general solution y C cos x and the. x 2 y

Name: Solutions Final Exam

MATH 2410 Review of Mixing Problems

Math Applied Differential Equations

MA 123 (Calculus I) Lecture 6: September 19, 2016 Section A3. Professor Joana Amorim,

Math 20D Final Exam 8 December has eigenvalues 3, 3, 0 and find the eigenvectors associated with 3. ( 2) det

Chapter 2: First Order ODE 2.4 Examples of such ODE Mo

4. Some Applications of first order linear differential

Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017

Chapter1. Ordinary Differential Equations

Tangent Lines Sec. 2.1, 2.7, & 2.8 (continued)

Math 217 Practice Exam 1. Page Which of the following differential equations is exact?

MAT 275 Test 1 SOLUTIONS, FORM A

Practice Final Exam Solutions

REVIEW PROBLEMS FOR MIDTERM I MATH 2373, SPRING 2015 ANSWER KEY

1 st ORDER O.D.E. EXAM QUESTIONS

Mathematics. Pre-Leaving Certificate Examination, Paper 1 Higher Level Time: 2 hours, 30 minutes. 300 marks L.17 NAME SCHOOL TEACHER

y = (1 y)cos t Answer: The equation is not autonomous because of the cos t term.

2017 LCHL Paper 1 Table of Contents

MATH 104 Practice Problems for Exam 2

Drill Exercise Differential equations by abhijit kumar jha DRILL EXERCISE - 1 DRILL EXERCISE - 2. e x, where c 1

Differential Equations Class Notes

3.2 Systems of Two First Order Linear DE s

Chapter 6: Messy Integrals

1.5. Applications. Theorem The solution of the exponential decay equation with N(0) = N 0 is N(t) = N 0 e kt.

Practice Final Exam Solutions

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

Math Assignment 2

V 1 V 2. r 3. r 6 r 4. Math 2250 Lab 12 Due Date : 4/25/2017 at 6:00pm

9.1 Solving Differential Equations

APPM 2360: Midterm exam 1 February 15, 2017

June 2011 PURDUE UNIVERSITY Study Guide for the Credit Exam in (MA 262) Linear Algebra and Differential Equations

Transcription:

Project #1 Math 181 Name: Email your project to ftran@mtsac.edu with your full name and class on the subject line of the email. Do not turn in a hardcopy of your project. Step 1: Initialize the program: with(detools): Direction Fields: To sketch the slope fields, say the differential equation: = sin( xy) To sketch a slope fields with initial value; = sin( xy), y( 1) 1 = DEplot(D(y)(x)=*sin(x*y(x)),y(x),x=-..,[[y(1)=1]],y=-5..5) Problem 1: Use the above syntax to sketch the slope fields of the following differential equations: a) = x 3y; y( 0) = b) = cos( xy) + x; y( 1) = 1 c) 1 = x y + 1; y( 3) = d) = ln ( x + y) ; y( 1) = 0 e) = sin( x) + cos( y); y( π ) = f) = x tan( y) ; y( 0) = 1

Solving Differential Equations: : Define an ODE: (There are several ways of defining equations, we start with the basic one first, just basically give the ODE a name) Ex1: Solve the First Order Differential Equation: 1 y = sin( t) 3 > with(detools): > eq1:=diff(y(t),t)-(1/3)*y(t)=sin(t); > dsolve(eq1,y(t)); eq1 := d y( t) - 1 3 y( t) = sin( t) 1 y( t) = - 9 10 cos( t) - 3 10 sin( t) + e 3 t _C1 We can solve with initial values: Set up the initial value: > IC:=y(0)=1; IC := y( 0) = 1 Solve the IVP as follows: > sol:=dsolve({eq1,ic},y(t)); sol := y( t) = - 9 10 cos( t) - 3 10 sin( t) + 19 10 e 1 3 t Problem 1: Follow the outline above to solve problems 15 0 on page 61. Higher Order ODE: d y Example: m + b + ky = 0 > eq:=m*diff(y(t),t$)+b*diff(y(t),t)+k*y(t)=0; d eq := m y( t) + b d y( t) + k y( t) = 0 4 3 d y d y d y t Example: 35 50y 4 5e 10 + + = 4 3 > eq3:=diff(y(t),t$4)-10*diff(y(t),t$3)+35*diff(y(t),t$)- 50*y(t)+4=5*exp(t); d 4 eq3 := y( t) d 3-10 4 y( t) d + 35 3 y( t) - 50 y( t) + 4 = 5 e t Solving ODE: > dsolve(eq1,y(t)); y( t) = - 9 10 cos( t) - 3 1 10 sin( t) + e 3 t _C1 > dsolve(eq,y(t));

- y( t) = _C1 e b - b - 4 k m t m - + _C e b + b - 4 k m t m Solving IVP Now, with equation #1, we want to solve it with initial value say y ( 0) > dsolve({eq1,y(0)=pi},y(t)); = π 1 y( t) = - 9 10 cos( t) - 3 10 sin( t) + e 3 t p + 9 10 For equation #, we want to solve with initial value y ( 0 ) = 10, y' ( 0) = We can define the initial value as: > IV:=y(0)=10, D(y)(0)=; IV := y( 0) = 10, D( y) ( 0) = and for equation #, for instance, m =1, b = -, k =0.1, we then substitute into equation # with new equation name: > eqm:=subs(m=1,b=-,k=0.1,eq); eqm := d y( t) - d y( t) + 0.1 y( t) = 0 Now, we can solve eqm with the initial value IV as follows: > dsolve({eqm,iv},y(t)); y( t) = 5-4 3 10 e 1 10 ( 10 + 3 10 ) t 4 + 3 10 + 5 e - 1-10 + 3 10 10 ( ) t Problem # Now, use the outline above to solve the following ODE: + e + e y y t t a) ( 1 ) = 0; ( 0) = 1 d y c) 4 + 7 y = 0; y( 0) = 0; y' ( 0) = 1 d x e) + x = sin( t) ; x( 0) = 1; x' ( 0) = 1 d x g) + x = t sin t; b) + y = sin x; y( 1) d x π = d) + 4 + 4x = cos t; x( 0) = π, x' ( 0) = 1 f) y' '' 3y'' + 3y' y = x 4e x x + h) ( ) y''' 3y'' 3y' + y = e x + e

Ex: Suppose that you borrow $600,000 to buy a house at 5.5% annual interest rate for a period of 30 years. a) Let B(t) be the your loan balance at any time t (in years) and M be the monthly payment. Set up an IVP for B(t). > with(detools): > Initial balance Set up IVP Solve the IVP Find the balance 30 years later in term of M Find the monthly payment Find the balance at any time t. Find the balance after one year B(1) Find the interest for year one. Now, suppose you want to pay off the loan faster, and you have additional $300/month. Balance function with new payment Find when the loan is paid off with new payment.

Problem #3: Follow the outline as above to solve the following: Suppose you borrow a $500,000 to buy a house at an interest rate of 6.5% for 30 years. a) Let B(t) be the balance of your loan at time t (in years), and M be your monthly payment. Set up an IVP for B(t) and then solve for B(t) in term of M. b) Determine your monthly payment. c) Determine the interest amount after the first year. d) How much interest do you pay when you pay off the loan after 30 years? e) Suppose you want to pay off the loan sooner, you put in an extra $00 per month. Determine the time to pay off the loan with this new payment. f) Determine the interest you pay with this new payment and finally compare this interest with interest in (c) to determine how much you save and how much time you save. g) Suppose you go with the loan with the new payment for 3 years, then a certain bank offers you an interest rate of 6% for 15 years with paper work of $5,000 (closing cost). Should you consider refinance your loan why or why not? Application: Mixing Problems Ex3: A tank initially contains 40 gal of sugar water having a concentration of 3 lb of sugar for each gallon of water. At time zero, sugar water with a concentration of 4 lb of sugar per gal begins pouring into the tank at a rate of gal per minute. Simultaneously, a drain is opened at the bottom of the tank so that the volume of the sugar-water solution in the tank remains constant. (a) How much sugar is in the tank after 15 minutes? (b) How long will it take the sugar content in the tank to reach 150 lb? 170 lb? (c) What will be the eventual sugar content in the tank? Initialize: > restart; > with( DEtools ): > with( plots ): The mathematical formulation of this problem must express the physical requirement that d (amount of sugar in tank) = (rate sugar is added to tank ) - ( rate sugar is removed from tank ) Let x ( t) denote the amount of sugar (pounds) in the tank at time t (minutes). Then, the rates in and out are respectively. > rate_in := 4 * ; > rate_out := (x(t)/40) * ; so that the governing ODE is > ode := diff( x(t), t ) = rate_in - rate_out; The amount of sugar in the tank initially, that is, when t = 0, gives the initial condition > ic := x(0)=40 * 3; The solution to the IVP is > sol := dsolve( { ode, ic }, x(t), [linear] ); (a) The amount of sugar (in pounds) in the tank after 15 minutes is > eval( sol, t=15. ); (b) The tank will contain 150 pounds of sugar at a time t (in minutes) satisfying > eq150 := eval( sol, x(t)=150 ); Thus, the desired time is found by the calculations > t150 := solve( eq150, t ): > t[`150 lbs`] = t150; > `` = evalf(t150); Repeating the same steps for the time when 170 pounds of sugar are in the tank leads to the equation

> eq170 := eval( sol, x(t)=170 ); whose solution is > t170 := solve( eq170, t ): > t[`170 lbs`] = t170; `` = evalf(t170); This complex-valued solution is clearly not physically realistic. A quick inspection of the solution, graph with title One tank mixing problem > plot( rhs(sol), t=0..10, title="one tank mixing problem" ); shows that the amount of sugar in the tank reaches a stea-state limit that is well below 170 pounds. Therefore, at no time is there ever 170 pounds of sugar in the tank. (c) In (b) it was noted that the amount of sugar in the tank levels off below 170 pounds. The exact limit can be determined from the solution by looking at the limit as t, that is, at > stea_state := map( Limit, sol, t=infinity ); whose value is > value( stea_state ); Note that x = 160 is an equilibrium solution for this ODE. However, be careful to avoid the common error of concluding that the limit is 160 pounds because x = 160 is an equilibrium solution. Problem 4: Use the outline above to solve the following: a) Initially, a 100 liter tank contains a salt solution with concentration 0.5 kg/liter. A fresher solution with concentration 0.1 kg/liter flows into the tank at the rate of 4 liter/min. The contents of the tank are kept well stirred, and the mixture flows out at the same rate it flows in. i. Find the amount of salt in the tank as a function of time. ii. Determine the concentration of salt in the tank at any time. iii. Determine the stea state amount of salt in the tank. iv. Find the stea state concentration of salt in the tank. b) At the start, 5 lbs of salt are dissolved in 0 gal of water. Salt solution with concentration lb/gal is added at a rate of 3gal/min, and the well stirred mixture is drained out at the same rate of flow. How long should this process continue to raise the amount of salt in the tank to 5 lbs?