Subjects differential equations

Ode Laplace

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. Problem 1(a): Solve the differential equation $$\sin(2x) \frac{dy}{dx} = y \sin x$$ with initial condition $$y(0) = 2$$. Step 1: Rewrite the equation as $$\frac{dy}{dx} = \frac{y \sin x}{\sin(2x)}$$. Step 2: Use the identity $$\sin(2x) = 2 \sin x \cos x$$ to get $$\frac{dy}{dx} = \frac{y \sin x}{2 \sin x \cos x} = \frac{y}{2 \cos x}$$, valid where $$\sin x \neq 0$$. Step 3: This is separable: $$\frac{dy}{y} = \frac{dx}{2 \cos x}$$. Step 4: Integrate both sides: $$\int \frac{1}{y} dy = \int \frac{1}{2 \cos x} dx$$ $$\ln |y| = \frac{1}{2} \int \sec x dx + C$$ Step 5: Recall $$\int \sec x dx = \ln|\sec x + \tan x| + C$$, so $$\ln|y| = \frac{1}{2} \ln|\sec x + \tan x| + C$$. Step 6: Exponentiate to solve for $$y$$: $$y = A (\sec x + \tan x)^{1/2}$$ where $$A = e^C$$. Step 7: Use initial condition $$y(0)=2$$: $$y(0) = A(\sec 0 + \tan 0)^{1/2} = A (1+0)^{1/2} = A = 2$$. Final solution: $$\boxed{y = 2 (\sec x + \tan x)^{1/2}}$$. --- 2. Problem 1(b): Solve $$\frac{d^2 y}{dx^2} - 2 \frac{dy}{dx} + y = x^2 e^x$$ using the D-operator. Step 1: Write as $$\left(D^2 - 2D + 1\right) y = x^2 e^x$$ where $$D = \frac{d}{dx}$$. Step 2: The characteristic equation is $$m^2 - 2m + 1 = 0$$, which factors as $$(m-1)^2 = 0$$, so the complementary solution is $$y_c = (C_1 + C_2 x) e^x$$. Step 3: Since RHS is $$x^2 e^x$$ and $$e^x$$ is repeated root, try particular solution of form $$y_p = e^x (A x^2 + B x^3 + C x^4)$$ but actually for repeated root multiplicity 2 we multiply rhs by $$x^2$$, so guess $$y_p = e^x (a x^4 + b x^3 + c x^2)$$. Step 4: To save effort, use the annihilator method or variation of parameters, but here proceed symbolically or match coefficients (too long for here). After calculations, the particular solution is $$y_p = e^x \left( \frac{x^4}{12} \right)$$. Step 5: Therefore, $$\boxed{y = (C_1 + C_2 x) e^x + \frac{x^4}{12} e^x}$$. --- 3. Problem 2(a): Solve the homogeneous differential equation $$(x^2 - y^2) dx + 2xy dy = 0$$. Step 1: Rewrite as $$\frac{dy}{dx} = - \frac{x^2 - y^2}{2 x y}$$. Step 2: Substitute $$v = \frac{y}{x} \Rightarrow y = v x$$, so $$\frac{dy}{dx} = v + x \frac{dv}{dx}$$. Step 3: Substitute into the ODE: $$v + x \frac{dv}{dx} = - \frac{1 - v^2}{2 v}$$. Step 4: Rearranged: $$x \frac{dv}{dx} = - \frac{1 - v^2}{2 v} - v = - \frac{1}{2 v} + \frac{v}{2} - v = - \frac{1}{2 v} - \frac{v}{2}$$. Step 5: So $$x \frac{dv}{dx} = - \frac{1}{2 v} - \frac{v}{2}$$. Step 6: Separate variables: $$\frac{dv}{- \frac{1}{2 v} - \frac{v}{2}} = \frac{dx}{x}$$. Step 7: Simplify denominator: $$-\frac{1}{2v} - \frac{v}{2} = -\frac{1 + v^2}{2 v}$$, so $$\frac{dv}{- \frac{1+v^2}{2 v}} = \frac{dx}{x}$$, that is $$- \frac{2 v}{1 + v^2} dv = \frac{dx}{x}$$. Step 8: Integrate both sides: $$-2 \int \frac{v}{1+v^2} dv = \int \frac{dx}{x}$$. Step 9: Use substitution $$w = 1 + v^2 \Rightarrow dw = 2 v dv$$: $$-2 \int \frac{v}{1+v^2} dv = -2 \int \frac{1}{w} \cdot \frac{dw}{2} = - \int \frac{1}{w} dw = - \ln |w| + C = - \ln (1+v^2) + C$$. Step 10: Thus, $$- \ln (1 + v^2) = \ln |x| + C$$, which is $$\ln \frac{1}{1+v^2} = \ln |x| + C$$. Step 11: Exponentiate: $$\frac{1}{1+v^2} = A x$$ where $$A = e^C$$. Step 12: Recall $$v = \frac{y}{x}$$, so $$1 + \left(\frac{y}{x}\right)^2 = \frac{1}{A x}$$, which gives $$1 + \frac{y^2}{x^2} = \frac{1}{A x}$$, multiply by $$x^2$$ $$x^2 + y^2 = \frac{x}{A}$$. Step 13: Write final implicit solution: $$\boxed{x^2 + y^2 = C x}$$ where $$C = \frac{1}{A}$$. --- 4. Problem 2(b): Solve $$\frac{d^2 y}{dx^2} + 4 y = \cos 2x + \cos 4x$$ using the method of undetermined coefficients. Step 1: The homogeneous equation $$\frac{d^2 y}{dx^2} + 4 y = 0$$ has characteristic equation $$m^2 + 4 = 0 \Rightarrow m = \pm 2i$$, so the complementary solution is $$y_c = C_1 \cos 2x + C_2 \sin 2x$$. Step 2: Since RHS is sum of cosines, try particular solution $$y_p = A x \sin 2x + B x \cos 2x + C \cos 4x + D \sin 4x$$. Terms with $$x$$ appear because $$\cos 2x$$ is solution to homogeneous, so multiply by $$x$$. Step 3: Substitute $$y_p$$ and its derivatives into the equation and equate coefficients. After algebra, solution is: $$y_p = \frac{x}{4} \sin 2x - \frac{1}{12} \cos 4x$$. Step 4: Full solution: $$\boxed{y = C_1 \cos 2x + C_2 \sin 2x + \frac{x}{4} \sin 2x - \frac{1}{12} \cos 4x}$$. --- 5. Problem 2(c): Solve $$\frac{d^2 y}{dx^2} - 6 \frac{dy}{dx} + 9 y = e^{3x}$$ with initial conditions $$y(0) = 0$$ and $$y'(0)=1$$ using the undetermined coefficients method. Step 1: Characteristic equation: $$m^2 - 6 m + 9 = 0 \Rightarrow (m-3)^2 = 0$$, so $$y_c = (C_1 + C_2 x) e^{3x}$$. Step 2: RHS is $$e^{3x}$$ but it's repeated root, so particular solution guess: $$y_p = A x^2 e^{3x}$$. Step 3: Compute derivatives: $$y_p' = A e^{3x} (2 x + 3 x^2)$$ $$y_p'' = A e^{3x} (2 + 12 x + 9 x^2)$$. Step 4: Substitute into LHS: $$y_p'' - 6 y_p' + 9 y_p = e^{3x} A (2 + 12 x + 9 x^2) - 6 A e^{3x} (2 x + 3 x^2) + 9 A x^2 e^{3x}$$ Simplify: $$= A e^{3x} [2 + 12 x + 9 x^2 - 12 x - 18 x^2 + 9 x^2] = A e^{3x} 2$$ Step 5: Set equal to RHS: $$A e^{3x} 2 = e^{3x} \Rightarrow 2 A = 1 \Rightarrow A = \frac{1}{2}$$. Step 6: Particular solution: $$y_p = \frac{1}{2} x^2 e^{3x}$$. Step 7: General solution: $$y = (C_1 + C_2 x) e^{3x} + \frac{1}{2} x^2 e^{3x}$$. Step 8: Use initial conditions. At $$x=0$$: $$y(0) = C_1 e^{0} + C_2 \cdot 0 + 0 = C_1 = 0$$. Step 9: Compute $$y'(x)$$: $$y' = \frac{d}{dx} \left[ (C_1 + C_2 x) e^{3x} + \frac{1}{2} x^2 e^{3x} \right]$$ $$= (C_2 e^{3x} + (C_1 + C_2 x) 3 e^{3x}) + \frac{1}{2} (2 x e^{3x} + x^2 3 e^{3x})$$ $$= e^{3x} [C_2 + 3 C_1 + 3 C_2 x + x + \frac{3}{2} x^2]$$ since $$C_1=0$$, $$= e^{3x} [C_2 + 3 C_2 x + x + \frac{3}{2} x^2]$$. Step 10: At $$x=0$$: $$y'(0) = e^0 (C_2 + 0 + 0 + 0) = C_2 = 1$$. Step 11: Final solution: $$\boxed{y = (0 + 1 \cdot x) e^{3x} + \frac{1}{2} x^2 e^{3x} = x e^{3x} + \frac{1}{2} x^2 e^{3x}}$$.