Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 :)

share|cite|improve this question
up vote 6 down vote accepted

enter image description here

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

share|cite|improve this answer
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 7: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$. – Babak S. May 28 '12 at 7:49
@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. – Babak S. May 28 '12 at 8:04
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 8:31
+1 $\quad \ddot\smile\quad$ – amWhy Mar 5 '13 at 0:20

For fun,

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

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

                                x  + 6
share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.