User:Egm6321.f09.Team2/HW4

 See comments in google doc for Team 2. Egm6321.f09 21:03, 23 November 2009 (UTC)

Homework Assignment #4 - due Wednesday, 10/21, 21:00 UTC

Problem 1
p.19-1 For the Legendre equation 1 on p.14-2 with $$n=0$$, the homogeneous solution $$u_1(x)=1$$. Use reduction of order method 2 (undetermined factor) to find $$u_2(x)$$, the second homogeneous solution.

Problem Statement: Given the Legendra differential equation $$(1-x^2)y''-2xy'+n(n+1)y=0$$ with $$n=0$$ and given the homogeneous solution $$u_1(x)=1$$. use the reduction of order method 2 (undetermined factor) to find $$u_2(x)$$, the second homgeneous solution.

$$(1-x^2)y''-2xy'+n(n+1)y=0\ at\ n=0\ yields,$$

$$(1-x^2)y''-2xy'=0$$

From the form $$y''+a_1y'+a_0y=0$$

$$a_1(x)=-{2x\over 1-x^2}$$

The homogeneous solution is represented by:

$$y_H(x)=k_1u_1(x)+k_2u_2(x)$$

The full homogeneous solution is assumed to be:

$$y(x)=U(x)u_1(x)\ where\ U\ is\ unknown.$$


 * $$y'=Uu'_1+U'u_1$$ multiply by $$a_1(x)$$


 * $$y=Uu_1+2U'u'_1+U''u_1$$ multiply by $$a_2(x)=1$$

Adding yields: $$a_1y'+y=U[a_1u'_1+u_1]+U'[a_1u_1+2u'_1]+U''u_1$$

Since $$u_1$$ is a homogeneous solution $$[a_1u'_1+u_1]=0$$ and $$a_1y'+y=0$$ we get:

$$U'[a_1u_1+2u'_1]+U''u_1=0$$

Let $$Z=U'$$

$$Z[a_1u_1+2u'_1]+Z'u_1=0$$, solve for Z by direct integration.

$${Z'\over Z}+(a_1+{2u'_1\over u_1})=0$$, solve for Z by direct integration.

$$Z(x)={e^k\over (u_1)^2}exp[-\int_{}^ta_1(s)ds]$$

$$U(x)=\int_{}^x{e^k\over (u_1(t))^2}exp[-\int_{}^ta_1(s)ds]dt+k_1$$


 * $$\int_{}^ta_1(s)ds=\int_{}^t-{2s\over (1-s^2)}ds=ln(1-t^2)$$

$$y_H(x)=k_1u_1(x)+k_2u_2(x)=U(x)u_1(x)=e^ku_1\int_{}^x{1\over (u_1(t))^2}exp[-ln(1-t^2)]dt+k_1u_1(x)$$

Solve for $$u_2(x)$$

$$u_2(x)=u_1\int_{}^x{1\over (u_1(t))^2}exp[-ln(1-t^2)]dt=x\int_{}^x{1\over (x)^2}exp[-ln(1-t^2)]dt=x\int_{}^x{dt\over (x)^2(1-t^2)}$$



$$u_2(x)={x\over 2}ln\bigg({1+x\over 1-x}\bigg)-1$$

Problem 2
King et al., p.28, problem 1.1.b

Problem Statement: Show that the function $$u_1=x^{-1}sinx$$ is a solution of the differential equation $$ xy''+2y'+xy=0$$. Use the reduction of order method to find the second independent solution $$u_2$$.

Arrange the differential equation into the form $$y''+a_1y'+a_0y=0$$

$$y''+{2\over x}y'+y=0$$

$$a_1(x)=2/x$$

$$\int_{}^ta_1(s)ds=\int_{}^t{2\over s}ds=2ln(t)$$

$$u_2(x)=u_1(x)\int_{}^x{1\over u^2_1(t)}exp\bigg[-\int_{}^ta_1(s)ds\bigg]dt$$ [King Eq.(1.3)p.6]

$$u_2(x)={sinx\over x}\int_{}^x{1\over {sin^2t\over t^2}}exp[-2ln(t)]dt={sinx\over x}\int_{}^x{t^2\over sin^2t}exp[-2ln(t)]dt$$

 $$u_2(x)=\Bigg({sinx\over x}\Bigg)\Bigg({x^3\over 3}\Bigg)\Bigg({1\over {1\over 2}x-{1\over 4}sin2x}\Bigg)exp[-2ln(x)]$$

Problem 3
King et al., p.28, problem 1.3 b

$$ \frac{d^2y}{dx^2} + 4y = 2{\sec{2x}} $$

- Homogeneous Solution

$$ y'' + 4y = 0 $$ char.eg

$$ r^2 +4 = 0 $$

$$ r= +2i, -2i $$

$$ y_{H}= C_{1}{\cos{2x}} + C_{2}{\sin{2x}} $$

- Particular Solution by using Variation of Paramaters

$$ {\cos(2x)}C'_{1} + {\sin(2x)}C'_{2} = 0 $$

$$ -2{\sin(2x)}C'_{1} + 2{\cos(2x)}C'_{2} = 2{\sec(2x)} $$

$$ C'_{1} = -tan(2x) $$ $$ C'_{2} = 1 $$

$$ \int C'_{1} = -\int {tan(2x)} = 2ln{\cos(2x)} = ln{cos^2(2x)} $$

$$ \int C'_{2} = \int 1 = x $$

$$ y_{Gen} = y_{H} + y_{P} $$

$$ Y_{Gen} = C_{1}{\cos(2x)} + C_{2}{\sin(2x)} + ln{\cos(2x)} + x{\sin(2x)} $$

Problem 4
King et al., p.28, problem 1.3 c

$$ \frac{d^2y}{dx^2} + \frac{1}{x}\frac{dy}{dx} +( 1- \frac{1}{4x^2})y = x $$

- Find General Solution

- Homogeneous Solution

$$ \frac{d^2y}{dx^2} + \frac{1}{x}\frac{dy}{dx} +( 1- \frac{1}{4x^2})y = 0 $$

refer to king et al p11 -p14

$$ y_{H}= C_{1}\frac{1}{\sqrt{x}}{\cos{x}} + C_{2}\frac{1}{\sqrt{x}}{\sin{x}} $$

- Find Particular Solution by variations of paramaters

$$ \frac{1}{\sqrt{x}}{\cos{x}}C'_{1} + \frac{1}{\sqrt{x}}{\sin{x}}C'_{2} = 0 $$

$$ (x^{-\frac{3}{2}}{\cos{x}}-\frac{1}{\sqrt{x}}{\sin{x}})C'_{1} + (x^{-\frac{3}{2}}{\sin{x}}+\frac{1}{\sqrt{x}}{\cos{x}})C'_{2} = x $$

$$ W= \frac{1}{\sqrt{x}}{\cos{x}}(x^{-\frac{3}{2}}{\sin{x}}+\frac{1}{\sqrt{x}}{\cos{x}}) - \frac{1}{\sqrt{x}}{\sin{x}}(x^{-\frac{3}{2}}{\cos{x}}-\frac{1}{\sqrt{x}}{\sin{x}})= \frac{1}{x} $$

$$ C'_{1} = -\frac{1}{\sqrt{x}}{\sin{x}} $$

$$ C'_{2} = \frac{1}{\sqrt{x}}{\cos{x}} $$

$$ \int C'_{1} = -\int \frac{1}{\sqrt{x}}{\sin{x}} $$

$$ u= \frac{1}{\sqrt{x}} ,u'= -\frac{1}{2}x^{-\frac{3}{2}}, v'= {\sin{x}}   , v= -{\cos{x}}  $$

$$ C'_{1} = \frac{1}{\sqrt{x}}{\cos{x}} + \frac{1}{2} \int x^{-\frac{3}{2}}{\cos{x}} $$

$$ \int C'_{2} = \int \frac{1}{\sqrt{x}}{\cos{x}} $$

$$ u= \frac{1}{\sqrt{x}}  ,u'= -\frac{1}{2}x^{-\frac{3}{2}}  ,v'= {\cos{x}}  ,v={\sin{x}}   $$

$$ C'_{2}= \frac{1}{\sqrt{x}}{\sin{x}} + \frac{1}{2} \int x^{-\frac{3}{2}}{\sin{x}} $$

$$ y_{H}= C_{1}\frac{1}{\sqrt{x}}{\cos{x}} + C_{2}\frac{1}{\sqrt{x}}{\sin{x}} $$

$$ y_{P}= \frac{1}{2} \int x^{-\frac{3}{2}}{\cos{x}}(\frac{1}{\sqrt{x}}{\cos{x}}) + \frac{1}{2} \int x^{-\frac{3}{2}}{\sin{x}}(\frac{1}{\sqrt{x}}{\sin{x}}) $$

$$ y_{Gen}= C_{1}\frac{1}{\sqrt{x}}{\cos{x}} + C_{2}\frac{1}{\sqrt{x}}{\sin{x}} + \frac{1}{2} \int x^{-\frac{3}{2}}{\cos{x}}(\frac{1}{\sqrt{x}}{\cos{x}}) + \frac{1}{2} \int x^{-\frac{3}{2}}{\sin(x)}(\frac{1}{\sqrt{x}}{\sin{x}}) $$

Problem 5
Problem statement: King et al., p.28, problem 1.1 b, reference p.22-2 from class notes.
 * $$xy''+2y'+xy=0 \!$$
 * $$u_1(x)=\frac{\sin(x)}{x}$$


 * 1) Verify if the equation is exact
 * 2) Is it possible to use the integrating factor method?
 * 3) Attempt the following trial solutions (r=const)
 * 4) $$y(x)=e^{rx} \!$$
 * 5) $$y(x)=xe^{rx} \!$$
 * 6) $$y(x)=\frac{1}{x}e^{rx} \!$$
 * 7) Use the undetermined factor method on the correct trial solution to obtain a second trial solution. Compare to the provided $$u_1(x) \!$$

There are two conditions to verify exactness. Condition 1: can we re-write the equation as $$f(x,y,p)y'' +g(x,y,p) \!$$, where $$p=y' \!$$ and indeed we can,
 * $$f=x \!$$
 * $$g=2p+xy \!$$

Condition 2: do the following relations hold,
 * $$f_{xx}+2pf_{xy}+p^2f_{yy}=g_{xp}+pg_{yp}-g_y\!$$
 * $$f_{xp}+pf_{yp}+2f_y=g_{pp} \!$$

The terms of the first equation are,
 * $$f_{xx}=0 \!$$, $$f_{xy}=0 \!$$, $$f_{yy}=0 \!$$
 * $$g_{xp}=0 \!$$, $$g_{yp}=0 \!$$, $$g_{y}=x \!$$

 which leads to $$0=-x \!$$, therefore the equation is not exact.

To use the integrating factor method the equation must be made exact. Multiplying the differential equation by $$x^my^n \!$$ and solving for the $$m \!$$ and $$n \!$$ that make the equation exact, will allow the integrating factor method to be used.

The second equation has terms with the partial with respect to $$p \!$$ taken. Therefore, even before applying $$x^my^n \!$$ we know $$f_{xp}=f_{yp}=g_{pp}=0 \!$$. Then $$f_{y}=x^{m+1}ny^{n-1} \!$$, so
 * $$2x^{m+1}ny^{n-1}=0 \!$$

Therefore, $$n=0 \!$$, simplifying the problem. Now, $$f_{xy}=f_{yy}=g_{yp}=g_y=0 \!$$. Using $$f_{xx}=m(m+1)x^{m-1} \!$$ and $$g_{xp}=2mx^{x-1} \!$$ yields,
 * $$m(m+1)x^{m-1} = 2mx^{m-1} \!$$

 Therefore, $$m=1 \!$$. So,
 * $$x^2y''+2xy+x^2y=0 \!$$ is exact and the integrating factor method can be used.

Instead we will attempt trial solutions. First try,
 * $$y=e^{rx} \!$$, $$y'=re^{rx} \!$$, $$y''=r^2e^{rx} \!$$

Plugging into the equation yields,
 * $$xr^2+2+x=0 \!$$

This cannot be factored to find a constant solution for $$r \!$$. Therefore this is not a solution. Second try,
 * $$y=xe^{rx} \!$$, $$y'=e^{rx}+xre^{rx} \!$$, $$y''=2re^{rx}+xr^2e^{rx} \!$$

Plugging into the equation yields,
 * $$x^2r^2+4xr+2+x^2 \!$$

This also cannot be factored to find a constant solution for $$r \!$$. This is not a solution. Third try,
 * $$y=\frac{1}{x}e^{rx} \!$$, $$y'=-\frac{1}{x^2}e^{rx}+\frac{1}{x}re^{rx} \!$$, $$2\frac{1}{x^3}e^{rx}-2\frac{1}{x^2}re^{rx}+\frac{1}{x}r^2e^{rx} \!$$

Plugging into the equation yields,
 * $$r^2+1=0 \!$$

 This yields the solutions, $$r=+/-\sqrt{-1}=+/-i \!$$. Taking the positive solution we get,
 * $$u_1(x)=\frac{e^{ix}}{x} \!$$

Using the undetermined factor method to find $$u_2(x) \!$$ proceeds by assuming,
 * $$y(x)=U(x)u_1(x) \!$$

Rearranging the differential equation we get,
 * $$y+\frac{2}{x}y'+y=y+a_1y'+a_0y=0 \!$$

Plugging in $$y(x) \!$$ we get,
 * $$a_0y+a_1y'+y=U[a_0u_1+a_1u_1'+u_1]+U'[a_1u_1+2u_1']+U''u_1 \!$$

Or
 * $$U'(a_1u_1+2u_1')+U''u_1=0 \!$$

The result is reduced order therefore we can substitute $$Z=U' \!$$,
 * $$u_1Z'+(a_1u_1+2u_1')Z=0 \!$$

Now we can directly integrate and we get,
 * $$Z=c\frac{1}{u_1^2}e^{-\int^{x}a_1(s)\,ds} \!$$

and
 * $$U=c\int^{x}\frac{1}{u_1(t)^2}e^{-\int^{t}a_1(s)\,ds}\,dt+c_2$$

Plugging $$U \!$$ into $$y(x)=Uu_1 \!$$ we find that
 * $$u_2=u_1\int^{x}\frac{1}{u_1(t)^2}e^{-\int^{t}a_1(s)\,ds}\,dt \!$$

Using $$a_1(x)=\frac{2}{x} \!$$ and $$u_1(x)=\frac{e^{ix}}{x} \!$$ we find that,


 * $$u_2(x)=\frac{e^{-ix}}{-2ix} \!$$

Comparing to the original solution, $$u_1(x)=\frac{\sin{x}}{x} \!$$ we find that there are similarities. That is because,
 * $$\sin{x}=\frac{e^{ix}-e^{-ix}}{2i} \!$$.

Problem 6
Problem Statement: Describe in words step-by-step method of attacking linear, second-order, differential equations with varying coefficients (L2_ODE_VC). Reference p.22-3 from class notes.


 * 1) Try reduction of order method 0 (missing in dependent variable). This makes the problem a 1st order ODE.
 * 2) Attempt to solve by direct integration (works for homogeneous solutions)
 * 3) Else if exact, use integrating factor method
 * 4) Else, make exact by using the Euler integrating factor
 * 5) Try reduction of order method 1 (finding the first integral $$\phi$$)
 * 6) If exact this will lead to a 1st order ODE and now you can use the methods from step 1
 * 7) Else, make exact by using the Euler integrating factor
 * 8) If the equation is homogenous
 * 9) See if it follows the Euler equation $$\textstyle \sum_{i=0}^N a_ix^iy^{(i)}$$
 * 10) Try transfer of variables
 * 11) Or undetermined coefficient (trial solution)
 * 12) If one homogenous solution is obtained, use reduction of order method 2 (undetermined factor) to obtain the second solution
 * 13) Use both homogenous solutions with variation of parameters to obtain the full solution
 * 14) If non-homogeneous and one homogeneous solution is obtained, use the undetermined factor method to obtain the entire solution all at once
 * 15) If all else fails you may attempt as many trial solutions as you desire (works for both homogeneous and non-homogeneous equations)

Problem 7
King et al., p.28, problem 1.1 ab, reference p.23-1 from class notes for details

Problem Statement: Find the second independent solution $$u_2$$ using (from Lecture 23-1): (1) Variation of parameters (after knowing $$u_1$$ and $$u_2$$; and (2)an Alternative Method as discussed in Lecture 21-2 and 21-3.

(a) $$u_1=e^x$$, $$(x-1)y''-xy'+y=x$$ (b) $$u_1=(1/x)(\sin x)$$, $$xy''+2y'+xy=x$$

Starting with Part 2 (the Alternative Method), as Part 1 requires knowing both $$u_1$$ and $$u_2$$: (a)$$y(x)=U(x)u(x)$$ assuming a full (including $$u_2$$ homogeneous solution. Taking the 1st and 2nd derivative, combining like terms and eliminating all $$u_1$$ related terms: $$0=U'(a_1u_1+2u_1')+U''u_1$$   which is missing a U variable.  Substituing Z for U' and solving for Z:

$$Z=\int_{}^{} exp (-x(1-x))\, dx = \int_{}^{}U', dx$$ $$u_2=u_1(U)=(e^x)(-exp(-x(1-x)) = -exp(x-1)$$

Part 1: $$y=c_1(x)u_1(x)+c_2(x)u_2(x)$$;  $$u_1(c_1)'+u_2(c_2)'=0$$;     $$(u_1)'(c_1)'+(u_2)'(c_2)'=f$$ $$(c_1)'=-(f u_2)/W$$ and $$(c_2)'=(f u_1)/W$$ where $$W=u_1u_2' - u_2u_1'$$

The particular integral is then: $$y(x)=\int_{}^{x}f(s){\frac{u_1(s)u_2(x)-u_1(x)u_2(s)}{W(s)}}, ds$$ where $$u_1(x)=e^x$$, $$u_2(x)=(e^x)(-exp(-x(1-x))$$, $$W(s)=(1-x)(exp(2x-1))$$ Solving for $$y_p(x)=\frac{2x}{1-x}$$ and therefore the full solution is: $$y(x)=y_h + y_p = e^x - exp(x-1) - \frac{2x}{x-1}$$

(b) $$u_1=(1/x)(\sin x)$$, $$xy''+2y'+xy=x$$ Again, starting with Part 2 and following the same steps as in (a) creates $$0=U'(a_1u_1+2u_1')+U''u_1$$  which is missing a U variable. Substituing Z for U' and solving for Z: $$\frac{Z'}{Z}+(1+\frac{u_1'}{u_1})=0$$ $$U=(-1 +\csc^2 (x)(exp(cot x))$$ $$u_2 = U (u_1) = \frac{(exp(\cot x) - 1}{x\sin x}$$

Part1: As in (a), we find $$W=u_1u_2' - u_2u_1'$$ and  the particular integral is then: $$y(x)=\int_{}^{x}f(s){\frac{u_1(s)u_2(x)-u_1(x)u_2(s)}{W(s)}}, ds$$ where $$u_1(x)=\frac{\sin x}{x}$$, $$u_2(x)=\frac{(exp(\cot x) - 1}{x\sin x}$$, $$W(s)=1$$ Solving for $$y_p(x)=(\frac{1}{x}-1)(exp(\cot x))$$ and therefore the full solution is: $$y(x)=y_h + y_p = \frac{\sin x}{x} + \frac{(exp(\cot x) - 1}{x\sin x} + (\frac{1}{x}-1)(exp(\cot x))$$

Contributing Team Members
Kumanchik

Joe Gaddone 00:13, 22 October 2009 (UTC)

Egm6321.f09.Team 2.walker 14:02, 3 November 2009 (UTC)

Egm6321.f09.Team2.sungsik 15:02, 8 November 2009 (UTC)