I am trying to evaluate the DSolve and compare it to my Runge-Kutta code.
DSolve [{y[X]*y'[X] - 7 y[X] + 12 X == X^(3/2), y[0] == 1 }, y[X], X]
What is wrong with this equation?
I am trying to evaluate the DSolve and compare it to my Runge-Kutta code.
DSolve [{y[X]*y'[X] - 7 y[X] + 12 X == X^(3/2), y[0] == 1 }, y[X], X]
What is wrong with this equation?
You can solve it numerically with NDSolve:
sol = NDSolve[{y[x]*y'[x] - 7 y[x] + 12 x == x^(3/2), y[0] == 1}, y[x], {x, 0, 10}]
To visualize:
Plot[y[x] /. sol, {x, 0, 10}]
w = Table [0, {m, 1, N1}]; w[[1]] = 1; w For [n = 2, n <= N1, n++, k1 = hf[w[[n - 1]], h(n - 1)]; k2 = h * f[w[[n - 1]] + 1/2k1, h(n - 1) + h/2]; k3 = h * f[w[[n - 1]] + 1/2k2, h(n - 1) + h/2]; k4 = h f[w[[n - 1]] + k3, nh]; w[[n]] = w[[n - 1]] + 1/6(k1 + 2k2 + 2 k3 + 2k4);] w // N DSolve [{y[X]*y'[X] - 7 y[X] + 12 X == X^(3/2), y[0] == 1 }, y[X], X]
– Srijan Banjara Mar 03 '22 at 21:58y[0] = 1by mistake.Clear[y]ory[0] =.should fix that, but won't change the fact that there is likely no analytic solution. – MathIsFun7225 Mar 04 '22 at 00:02