RK method for heat equation with dependent variables

1 reply · 2K views · last reply
maistral
Messages
235
Reaction score
17
Hello.

How do I solve this equation without killing the k(y) term:
Equation (1/x)(d/dx)[k(y) x dy/dx] = 0, followed by k(y) = 0.1y^2 + 0.15.


I managed to derive an analytical solution for this one. I intend to run the numerical solution via Runge-Kutta but I can't stop myself from killing the k(y) term. I'm starting to think I'm doing something wrong... It goes something like this:

Handwritten-style derivation: (1/x) d/dx[k(y) x dy/dx] = 0 expanded to k(y) d2y/dx2 + k(y)(1/x) dy/dx = 0, then to d2y/dx2 + (1/x) dy/dx = 0, with k(y) = 0.1y^2 + 0.15 below.


Even if I try and keep the k(y) term until I derive the systems of equations required to run Runge-Kutta, the integrator would then numerically kill it anyway. What should I do?
Any help please?
 
Nevermind. Solved it by using a proper substitution.