# Set the arbitrary coefficients to zero after obtaining a solution form DSolve [closed]

After solving an ODE with 'Solve' function, I'm getting a result as

Now I know that the coefficients $$c_1, c_2$$ have to be zero when I impose further restrictions on the solution, so after obtaining the above solution, how I can set the coefficients $$c_1, c_2$$ to zero so that I will only have the last term on the solution?

• Assuming sol is the solution, Try: sol2 = sol /. {C[1] -> 0, C[2] -> 0}
– Syed
Nov 11, 2021 at 11:32
• and if you want to do it for any ode order solution you can try sol /. C[_Integer] :> 0 btw, the title of your question should be DSolve not Solve Nov 11, 2021 at 11:44