I have the following ODE
c + (p + r) y[p] == p (u + (-1 + p) y'[p])
where car and u are parameters of the problem. I want to solve the ODE using a symbolic initial condition y(0)=x for some x, or also to impose an initial condition of the form y(z)=x where both x and y are symbols. For both these issues I tried to do DSolve, getting the solution with the constant C[1] and then using Solve[y(0)==x, c[1]] but I get error. I guess I should define a function y which maps p and c[1] and use that in Solve. Is there any straightforward way to do this?
sol = DSolveValue[{c + (p + r) y[p] == p (u + (-1 + p) y'[p])}, y[p], {p, 0, 1}] // FullSimplifyand then taking the limitLimit[sol, p -> 0]you should be able to see something – bmf Apr 11 '22 at 00:22K--- seethis answer. – bmf Apr 11 '22 at 00:25{...}around the ode and the bc. Also you really do not need to say{p,0,1}as this is analytical solution. You are not usingNDSolvehere. Try this from clean systemode = c + (p + r) y[p] == p (u + (-1 + p) y'[p]); ic = y[0] == k; DSolve[{ode, ic}, y[p], p]which gives{}as solution. – Nasser Apr 11 '22 at 01:34sol = DSolveValue[ode, y[p], p]theneq = k == Limit[sol, p -> 0] // InputFormit will giveConditionalExpression[k == ComplexInfinity, Element[c | u, Reals] && r > 1 && C[1] > 0]so it is not possible to solve the constant for the integrationC[1]that is why Mathematica can't find solution. If you copied from this a book, make sure you copied the IC correctly. – Nasser Apr 11 '22 at 01:41