4

Here is just an simple example that I want to use Maple to solve: $$h(x)=f(g(x))$$ $$g(x)=2x+1$$ $$h(x)=4x^2+4x+7$$

Find polynomial of $f(x)$

Thanks :)

hqt
  • 759
  • 4
  • 9
  • 19

2 Answers2

6

enter image description here

The desire function is the last output as you see. Thanks.

Mikasa
  • 67,374
  • Can you explain a bit at line 3 and 4,please. I know how they work, but I really don't understand why it works right. I'm thinking about your nice solution so much. Thanks :) – hqt May 28 '12 at 07:48
  • @Ilya: Thanks for your consideration, but I think we want the function $f(x)$ in that the composition of $f$ and $g$ becomes $h$. – Mikasa May 28 '12 at 07:49
  • 1
    @hqt: In this problem we should to go the inverse path you walked before for getting $h(x)$. So in line 3, I wanted to get $x$ from $g$ and that is why I named it with $t$ and solve it. In line 4 the reverse path I noted above was completed by using subs(...) command. – Mikasa May 28 '12 at 08:04
  • 1
    Perhaps it might be helpful to explain the commands a bit, like does "solve (g(x)=t,x)" always calculate the inverse of the fuction or what does "subs" do. – Gigili May 28 '12 at 08:31
1

For fun,

> h:=x->4*x^2+4*x+7:
> g:=x->2*x+1:

> rsolve( f(g(x)) = h(x), f(x) );

                                 2
                                x  + 6
acer
  • 5,293
  • No. I don't think it's just for fun. it's nice. but I don't know your solution compare to first one (above post) will be same performance or not :) – hqt May 28 '12 at 17:27