Message Boards Message Boards

Solve equations for composite functions?

GROUPS:

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

POSTED BY: malcolm migacz
Answer
2 months ago
f[x_] := x^2 + 2 
g[x_] := 4 x - 5
In[3]:= f[g[1]] 

Out[3]= 3 
POSTED BY: Alexander Trounev
Answer
2 months ago

you can also use the shortcut notation for composition (@*):

f@*g[1]

or

f@*g@1
POSTED BY: Neil Singer
Answer
2 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

POSTED BY: malcolm migacz
Answer
2 months ago

if f@*g[1] input , then input g(1). need input f(g(x)) need input : f(g(1)) , where f(x)=x^2+3 and g(x)=4x-5 if input correct , then output should calculate: f(g(1)) = 3 This calculation (solution) should be accomplished by WolframAlpha as : not contained in input of the problem.

POSTED BY: malcolm migacz
Answer
2 months ago

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

POSTED BY: Neil Singer
Answer
2 months ago

Group Abstract Group Abstract