3
$\begingroup$

Reported: [CASE:5287941] DSolve gives wrong solution. V 14.3


Using V 14.3, why DSolve gives solution $y=0$ which satisfies the IC given, but not the ode itself?

ode=Cos[x]*D[y[x],{x,2}]+3*y[x]==1; (* ID #22122*) ic={y[1]==0,Derivative[1][y][0]==0}; sol=DSolve[{ode,ic},y,x] 

enter image description here

ode /. sol 

enter image description here

ic /. sol 

enter image description here

Does this happen also in earlier versions? I tried it on V 14.2 and it gives same result.

$\endgroup$
7
  • 2
    $\begingroup$ Version 13.0.1 returns {}. $\endgroup$ Commented Aug 28 at 21:47
  • 1
    $\begingroup$ V12.0 returns the input with and without the ic specified. V14.3 returns interesting result without the ic and will not verify satisfying the ode. $\endgroup$ Commented Aug 28 at 21:55
  • $\begingroup$ Maybe because of this: {y[0] == 0 /. First@DSolve[ode, y, x], y'[0] == 0 /. First@DSolve[ode, y, x]} // Solve[#, {C[1], C[2]}] & $\endgroup$ Commented Aug 28 at 23:05
  • $\begingroup$ @MichaelE2 I think you mean y[1]==0 in there and not y[0] == 0. But we get same result anyway, which is that $c_1=0,c_2=0$ which gives $y=0$ solution. But I would think that DSolve should check again now that the solution satisfies the ode also, and not just the IC. It seems then DSolve does not do this extra check, which is strange. $\endgroup$ Commented Aug 29 at 1:47
  • $\begingroup$ Oops, yes, y[1]==0. I don't have time to spelunk it, but it certainly seems a bug. $\endgroup$ Commented Aug 29 at 2:14

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.