Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

Functions order truncation (linearization)

asked 5 years ago

I want from from expression like

e=(1+h+hx)(1+h+hy)

arrive to

e1+2h+hx+hy+O()

by assumptions h1;hx1;hy1

Is there instrument for such transformations in sagemath? The problem I'm running into is h being function of some vairables, while every occurance of big O notation in documentation operates on some ring variable.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 5 years ago

eric_g gravatar image

In such a case, I would introduce a "small" parameter, t say, substitute t*h for h, perform the expansion in term of t, and set t=1 in the final result. Here is the corresponding code:

sage: x, y = var('x y')
sage: h = function('h')
sage: H = h(x, y)
sage: e = (1 + H + diff(H, x)) * (1 + H + diff(H, y))
sage: e
(h(x, y) + diff(h(x, y), x) + 1)*(h(x, y) + diff(h(x, y), y) + 1)
sage: t = var('t')
sage: th(x, y) = t*H
sage: et = e.substitute_function(h, th)
sage: et
(t*h(x, y) + t*diff(h(x, y), x) + 1)*(t*h(x, y) + t*diff(h(x, y), y) + 1)
sage: taylor(et, t, 0, 1).subs({t: 1})
2*h(x, y) + diff(h(x, y), x) + diff(h(x, y), y) + 1
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 827 times

Last updated: Oct 24 '19