3.1 Quizz 1

  3.1.1 Problem 1
  3.1.2 Problem 2
  3.1.3 Problem 3
  3.1.4 Problem 4

PDF (letter size)

PDF (legal size)

3.1.1 Problem 1

Find the general solution of the following differential equationdydx=y+2xe2x Solution

Writing the ODE as(1)dydxy=2xe2x Shows it is a linear ode as it has for form   y+p(x)y=q(x) where in this case p(x)=1 and q(x)=2xe2x. The first step is to determine the integrating factor, which is given by I=ep(x)dx=e1dx=ex

Multiplying both sides of (1) by this integrating factor givesex(dydxy)=2xe2xex(dydxexyex)=2xex

But (dydxexyex)=ddx(yex) by the product rule. Hence the above becomesddx(yex)=2xexd(yex)=2xexdx

Integrating both sides givesd(yex)=2xexdx(2)yex=2xexdx+C

Where C is the constant of integration. What is left is to solve the integral xexdx. Using integration by partsudv=uvvdu Let u=x,dv=exdx, therefore du=dx and v=ex. Thereforexexdx=uvvdu=xexexdx

But exdx=ex. Hence the above becomes(3)xexdx=xexex Note that a constant of integration is not needed in (3), since constant of integration was already added in (2) earlier. Substituting (3) in (2) givesyex=2(xexex)+C Solving for y from the above (by multiplying both sides of the above equation by ex), gives the general solutiony=2(xexex)ex+Cex=2(xe2xe2x)+Cex

Thereforey(x)=2e2x(x1)+Cex The solution contains one constant of integration as expected since the order of the ODE is one.

3.1.2 Problem 2

Solve dydx=2xy(4y) Solution

This ode is separable because it can be written as y=p(y)q(x) Where the function p(y) depends explicitly on y only and the function q(x) depends on x only. In the given ODE, p(y)=y(4y) and q(x)=2x. Hence the ODE can be be written asdydx=p(y)q(x)1p(y)dy=q(x)dxy4

Integrating both  sides gives1p(y)dy=q(x)dx Replacing p(y)=y(4y) and q(x)=2x into the above gives(1)1y(4y)dy=2xdx The integral on the right side is 2xdx=2x22+C1(2)=x2+C1

Where C1 is the constant of integration. The integral on the left side is solved using partial fractions. Let1y(4y)=Ay+B4y=A(4y)+Byy(4y)=4AyA+Byy(4y)=4Ay(AB)y(4y)

Comparing the numerators shows that1=4Ay(AB) Which implies, by comparing coefficients of y on each side that 4A=1 and (AB)=0. This means A=14 and B=14. Therefore1y(4y)=141y+1414y=141y141y4

Hence the left integral in (1) now can be written as(3)1y(4y)dy=141ydy141y4dy But 1ydy=ln|y|. To find 1y4dy, let y4=u. Hence dy=du. Therefore 1y4dy=1udu=ln|u|=ln(|y4|)

Substituting all of this back in (3) gives1y(4y)dy=14ln|y|14ln(|y4|)=14(ln|y|ln(|4y|))(4)=14ln|y4y|

Now that both integrals are found, substituting (4) and (2) back in (1) gives14ln|y4y|=x2+C1ln|y4y|=4x2+4C1

Let 4C1=C2, a new constant.ln|y4y|=4x2+C2 Raising both sides to exponential gives|y4y|=e4x2+C2=eC2e4x2

Let eC2=C a new constant. The above becomesy4y=Ce4x2 The absolute on the left side can be removed by letting the new constant C absorbs the sign for either positive or negative..

Solving for y from the above in order to obtain an explicit solution givesy=(4y)Ce4x2=4Ce4x2yCe4x2y+yCe4x2=4Ce4x2y(1+Ce4x2)=4Ce4x2

Hence the solution is y=4Ce4x21+Ce4x2 The above can be simplified further by dividing numerator and denominator by Ce4x20 which givesy=41Ce4x2+1 Let 1C=C0 a new constant. Hence the final general solution becomesy(x)=41+C0e4x2 Where C0 is the constant of integration which can be found from initial conditions when given.

3.1.3 Problem 3

Solve dydx=x2+3y22xy Solution

This is homogeneous ODE. Dividing both the numerator and denominator of the right side by xy givesdydx=x2xy+3y2xy2xyxy(1)=xy+3yx2

Let v(x)=y(x)x be a new dependent variable. Hence y=vx. By the product ruledydx=v+dvdxx Substituting v=yx and replacing dydx by the above into (1) gives a new ODE in v(x) which is now separablev+dvdxx=1v+3v2dvdxx=1v+3v2v=1+3v2v2v=1+3v22vv=1+3v22v22v=1+v22v

The above ODE is separable. It can be written as2v1+v2dvdx=1xx02v1+v2dv=dxx

Integrating gives2v1+v2dv=dxx(2)=ln|x|+C1

Where C1 is constant of integration. To evaluate the left integral 2v1+v2dv, let u=1+v2. Hence du=2vdv. Therefore2v1+v2dv=2vu(du2v)=duu=ln|u|=ln|1+v2|

But |1+v2| is always positive so the absolute sign is not needed. Therefore2v1+v2dv=ln(1+v2) Substituting the above in (2) givesln(1+v2)=ln|x|+C1 Raising both sides to exponential gives1+v2=eln|x|+C1=xeC1

Since exponential function is never negative. Let eC1=C be a new constant. The above becomes1+v2=Cxv2=Cx1v=±Cx1

But v=yx. Hence the above becomesyx=±Cx1 Which impliesy=±xCx1x0 There are two solutions. They arey1(x)=xCx1y2(x)=xCx1

3.1.4 Problem 4

A tank initially contains 120 L of pure water. A mixture containing of α g/L of salt enters the tank at a rate of 2 L/min, and the well-stirred mixture leaves the tank at the same rate. Find an expression in terms of α for the amount of salt in the tank at any time t. Also find the limiting amount of salt in the tank as t

Solution

pict
Figure 3.1:Showing tank flow and initial conditions

Let x(t) be mass (amount) of salt (in grams) in the tank at time t. Let V(t) be the volume of water (mixture) (in litre) in the tank at time t. Using the equilibrium equation for change of mass of saltdxdt=rate of salt mass in  rate of salt mass out Which becomesdxdt=(2 Lmin)(α gL)  (2 Lmin)(x(t)V(t) gL)(1)=2α2x(t)V(t)

But V(t)=V(0)+(rate of mixture volume in  rate of mixture volume out)t=V(0)+(22)t=V(0)

But we are given that V(0)=120 L. HenceV(t)=120 Which means the volume of mixture remains constant in the tank (this is as expected, since rate of flow in is the same as rate of flow out). Substituting the above in (1) gives the ODE to solvedxdt=2α2x120=2αx60

The solution to above ODE gives the mass x(t) of salt in tank at time t. (2)dxdt+x60=2α This is linear ODE as it has the form x+p(t)x=q(t). The integrating factor is I=ep(t)dt=e160dt=et60. Multiplying both sides of the above ODE (2) by this integrating factor giveset60(dxdt+x60)=2αet60(dxdtet60+x60et60)=2αet60

But (dxdtet60+x60et60)=ddt(xet60) by the product rule. Hence the above becomesddt(xet60)=2αet60 Integrating both sides givesd(xet60)=2αet60dtxet60=2αet60dt+C

Where C is the constant of integration. To evaluate et60dt, let t60=u, then 160dt=du. Hence et60dt=eu(60du)=60eudu=60eu or 60et60. Therefore the above becomes xet60=2α(60et60)+C=120αet60+C

Multiplying both sides by et60 gives the general solution as(3)x(t)=120α+Cet60 Initial conditions are now used to find C. At t=0, we are given that x(0)=0  since there was no salt in the tank initially. Hence the above becomes at t=00=120α+CC=120α

Therefore (3) becomes the particular solution given by(4)x(t)=120α120αet60 To answer the final part, as t then et60e0 and the above giveslimtx(t)=120α In grams. The above is the limiting mass (amount) of salt in the tank. For example if α=1 grams per liter, then the maximum possible mass of salt in the tank will be 120 grams. The amount of salt is initially zero in the tank, and increases exponentially before leveling off at the limit given by 120α grams. The following is a plot that illustrates this for α=1.


pict
Figure 3.2:Showing limiting value of amount of salt for α=1