(a)
First choose a function , then set to ensure the equation is satisfied.
When choosing , we want to cover the whole domain of which is . We also need to satisfy the initial condition.
Start by trying :
But then . Since we should have . We can arrange for this by setting and solving for :
Therefore we define . Then:
So we use:
(b)
Same method but different condition:
Therefore we define . Then:
So we use: