# Solve equations for composite functions?

Posted 11 months ago
1831 Views
|
5 Replies
|
4 Total Likes
|
 Hello Ladies and Gentlemen, Please need instruction, how to enter equations for composite function . Entered f(g(1)) : f(x)=x^2+2;g(x)=4x-5 , if copied/pasted into Wolfram/Alpha. This is displayed {f(g(1))/f(x) = x^2 + 2, g(x) = 4 x - 5}. Entered f(g(1)),f(x)=x^2+2;g(x)=4x-5 , if copied/pasted into Wolfram/Alpha. This is displayed solve f(x) = x^2 + 2 g(x) = 4 x - 5 for f(x) g(x). How to input? Solve for f(g(1)) where f(x)=x^2+2 and g(x)=4x-5 ? if it is correctly entered the and calculated the correct answer should be 3.Thanks
5 Replies
Sort By:
Posted 11 months ago
 f[x_] := x^2 + 2 g[x_] := 4 x - 5 In[3]:= f[g[1]] Out[3]= 3 
Posted 11 months ago
 you can also use the shortcut notation for composition (@*): f@*g[1] or f@*g@1 
Posted 11 months ago
 If input : f[x] := x^2 + 2 g[x] := 4 x - 5 In[3]:= f[g[1]] Then Input reads : x^2+2g does not give correct input
 You need to enter you functions correctly. Also, I forgot some parenthesis around the second example. g[1] took precedence over the composition. In[1]:= f[x_] := x^2 + 2 g[x_] := 4 x - 5 In[2]:= f@*g@1 Out[2]= 3 In[3]:= (f@*g)[1] Out[3]= 3 Regards,Neil