Question: Second derivative for dsolve numeric solution of second order BOUNDARY VALUE PROBLEM.

Consider the second order BVP:

diff(u(x), x, x) = u(x), u(0) = 2, u(1) = 1

I want dsolve numeric to calculate the second derivative, diff(u(x), x, x)

The actual problem I am working on is a more complex BVP that cannot be solved symbolically, but this simpler BVP will illustrate the problem.

Several Mapleprimes posts say to add a second equation diff(u(x), x, x) = v(x) and solve the system for u(x), v(x). This works for IVP's. However, when I implement it as shown below for the BVP:

dsolve({diff(u(x), x, x) = u(x), diff(u(x), x, x) = v(x), u(0) = 2, u(1) = 1, v(1) = 1}, {u(x), v(x)})

dsolve solves the problem fine symbolically, but when I try to solve the problem numerically:

dsolve({diff(u(x), x, x) = u(x), diff(u(x), x, x) = v(x), u(0) = 2, u(1) = 1, v(1) = 1}, numeric)

I get the following error message:

Error, (in dsolve/numeric/bvp/convertsys) the ODE system does not contain derivatives of the unknown function v

The above dsolve numeric command is a simplifcation -- e.g. I use an approximate solution etc. -- dsolve numeric solves the original BVP just fine, but will NOT calculate the second derivative.

I have tried any number of variations. I can convert the original problem to a system of first order equations -- but then, of course, dsolve calculates no first derivatives -- so I don't have diff (u(x),x) = diff (u(x),x,x)! 

I've killed a whole day on this. I need to estimate the location of the inflection point in my real problem (the solution is a sigmoidal function). I can apply a finite difference approximation to the dsolve numeric solution, but it's not accurate enough. Dsolve should be more accurate, since dsolve will  regulate the error of the added variable, v(x), to within abserr.

Oh, you would make everyone's life so much easier if you would just have dsolve numeric return all the derivatives in the IVP/BVP being solved! Or provide a data struction as solution that can be integrated/differentiated.

Robert


 

 

 

Please Wait...