We had to code a program solving a starting point problem. (Runge-Kutta 6th Order)
The ordinary differential equation (first order) is: $y'*y= \cos x$ with $f(0)= 2$; $[0,10]$
I have 2 questions for that since Im not that familiar with differential equations.
One step methods for solving a starting point problem need the acclivity of the wanted method and a valid starting point.
So for a first order it has to be a actual point like $f(0)= 2$. Otherwise there are infinite amounts of possible solutions since there is a undefined constant $C$.
My prof asked me if an information $f'(x)=y$ is also a valid starting value: My answer would be no, because we need an exact starting point and the acclivity doesnt give us a specific point to start from since there could be infinite points in the array of curves having the same acclivity.
Then he changed the starting point to $f(1)=1$ $[1,3]$ and the program started to calculate strange values. Why is that?
My suggestion:
The analytic solution of the differential equation is : $$y=\sqrt{2\sin x+c}$$
With this starting point the constant $c$ equals about $-0.3$. When the $x$ value is about $2.7$, the method produces a negative root so its not defined anymore. Runge-Kutta can only calculate correct values if the method is consistent. So this condition isnt given anymore, so the programs gives us strange values.
Can somebody please verify or falsify my suggestion? It would help me A LOT!