0
$\begingroup$

I want to solve $$y''+y=x+1,y(0)=1$$ My solution:

I solve he differential equation and I get $$y=c_1\cos x+c_2\sin x+x+1$$ Then I know that $y(0)=1\implies c_1=0$

Finally I get $$\boxed{y=c\sin x+x+1}$$

Wolfram solution:

if I type in wolfram solver $y''+y=x+1,y(0)=1$ and the result I get is $$\boxed{y=c\sin x}$$

Which one is the correct solution finally?

$\endgroup$
  • $\begingroup$ $y(0) = c \sin(0) = 0 \neq 1$ $\endgroup$ – RayX Sep 26 '15 at 16:37
  • $\begingroup$ At least we can tell that the last solution doesn't satisfy the initial condiition. $\endgroup$ – pointer Sep 26 '15 at 16:37
  • $\begingroup$ you need a second boundary condition... $\endgroup$ – tired Sep 26 '15 at 16:38
  • 2
    $\begingroup$ Moral of the story: trust your own mathematics and logic. Your solution is correct. $\endgroup$ – Simon S Sep 26 '15 at 16:46
  • 1
    $\begingroup$ Completing the query to "y''+y=x+1,y(0)=1, y'(0)=a" gives again the correct solution. $\endgroup$ – LutzL Sep 26 '15 at 16:52
0
$\begingroup$

Your Answer:

$y''+y=-c\sin x+c\sin x+x+1=x+1$

Also $y(0)=1$. The same cannot be said about WA's answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.