ASSIGNMENT 03
DUE 2025
, Assignment 03: Question 1 Solutions
Question 1 (20 Marks)
Determine the solution y(x) for each of the following initial value problems:
(1.1) y ′ − yx cos x = 0, with y(π) = 1
Step 1: Rewrite the equation
We begin by isolating y ′ :
y ′ = yx cos x
This is a separable first-order ordinary differential equation.
Step 2: Separate variables and integrate
dy
= x cos x dx
y
Now integrate both sides:
Z Z
1
dy = x cos x dx
y
Use integration by parts on the right-hand side. Let:
u = x ⇒ du = dx, dv = cos x dx ⇒ v = sin x
Z Z
x cos x dx = x sin x − sin x dx = x sin x + cos x + C
Thus:
ln |y| = x sin x + cos x + C ⇒ y = Cex sin x+cos x
Step 3: Apply initial condition y(π) = 1
1 = Ceπ sin π+cos π = Ce0−1 = Ce−1 ⇒ C = e
Final Answer:
y(x) = ex sin x+cos x+1
1