Creating symbolic function with certain properties but unspecified functional form?

I've written code to symbolically log-linearize a non-linear model, and would like to specify several symbolic functions generally, without taking a stance on the functional form. In particular, I need f(1)=f'(1)=0 and f''(1)=k (constant). Is there an easy way to specify these properties of a symbolic function without being more specific about the functional form?
Let me know, thanks.

 Accepted Answer

Sort of. If you can give slightly more information about the form, you can use dsolve()
Within MuPAD, it would look something like this,
dsolve({f(1) = 0, (D(f))(1) = 0, (D[1, 1](f))(1) = k, (D[1, 1, 1](f))(x) = g(x)}, f(x))
The information I added here is D[1, 1, 1](f))(x) = g(x) -- that is, that the third derivative of f(x) is g(x) for some currently unresolved g(x).
I do not have MuPAD to test with, but Maple would resolve this to
f(x) = Int(Int(Int(g(_z1), _z1 = 1 .. _z1), _z1 = 1 .. _z1)+k*_z1, _z1 = 1 .. x)-k*x+k
here, _z1 is a variable that Maple introduced to supply integration limits.
At some later time, if you know (for example) that g(x) = sin(x), you can make a substitution,
subs(g(_z1)=sin(_z1),f(x))
after which in Maple you would convert(%,int) to change the inert Int() into actual int() (MuPAD does not have a convert() function). Maple would then resolve this particular example to
f(x) = -sin(1)-(1/2)*cos(1)+(1/2)*k+sin(1)*x-cos(1)*x+(1/2)*cos(1)*x^2+cos(x)+(1/2)*k*x^2-k*x

More Answers (0)

Asked:

on 26 Dec 2013

Commented:

on 27 Dec 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!