1

I have the following equation:

$$\frac{f(x)}{f'(x)}\left(f(x) + \frac{1+(f'(x))^2}{f''(x)}\right) = c$$

where $c$ is a constant $> 0$.

Mathematica handles this well and I'm able to plot it just fine using NDSolve, but only when $c = 0$. For any other value of $c$, I get errors and the plot comes out all wrong.

Can anyone help me here?

Edit

An example of the code I used for NDSolve was:

s = 
  NDSolve[
   {y[x]/y'[x] * (y[x] + (1+(y'[x])^2)/y''[x]) == 1, y[0] == 10, y'[0] == 0}, 
   y, {x, -0.5, 0.5}]
Matheus Andrade
  • 293
  • 1
  • 7

1 Answers1

2

It sounds to me that the problem might be with plotting, which is discussed in Easy way to plot ODE solutions from NDSolve? The following works without messages.

ListLinePlot@
 NDSolveValue[{y[x]/y'[x]*(y[x] + (1 + (y'[x])^2)/y''[x]) == 1, 
   y[0] == 10, y'[0] == 0}, y, {x, -0.5, 0.5}]

enter image description here

Michael E2
  • 235,386
  • 17
  • 334
  • 747