0

When I enter this

DSolve[y'[x]^2 + y[x]^2 == 1, y[x], x]

the answer I get is

{{y[x] -> -Sin[x - C[1]]}, {y[x] -> Sin[x + C[1]]}}

but the two functions $y(x)=1$ and $y(x)=-1$ which are also solutions to this differential equation aren't mentioned. Is this an oversight or am I missing something?

Frunobulax
  • 215
  • 1
  • 3

1 Answers1

1

If you want to include the case where the derivative is zero everywhere (which is not a differential equation), you can use

Join[
 DSolve[y'[x]^2 + y[x]^2 == 1, y[x], x],
 Solve[y[x]^2 == 1, y[x]]]

{{y[x] -> -Sin[x - C[1]]}, {y[x] -> Sin[x + C[1]]}, {y[x] -> -1}, {y[x] -> 1}}

Although, DSolve does not complain about the lack of a derivative in the equation

Join[
 DSolve[y'[x]^2 + y[x]^2 == 1, y[x], x],
 DSolve[y[x]^2 == 1, y[x], x]]

{{y[x] -> -Sin[x - C[1]]}, {y[x] -> Sin[x + C[1]]}, {y[x] -> -1}, {y[x] -> 1}}

% == %%

True

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198