Message Boards Message Boards

0
|
7987 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Deriving Functions Using Wolfram Alpha

f={(2,1),(4,-2),(5,5),(-2,6)}
g={(1,2),(-2,4),(5,5),(6,-2)}

The functions f and g are defined by the set of inputt and output values above;

Using Wolfram Alpha How would i  to answer the following?
1. find f(g(6)) =
2. find g(f(2)) =

Also how would i find what the equation for the f and g lines using Wolfram Alpha

Any help here is appreciated;
POSTED BY: Joe Robinson
3 Replies
"Polynomial interpolating {(2,1),(4,-2),(5,5),(-2,6)}"

http://www.wolframalpha.com/input/?i=Polynomial+interpolating+%7B%282%2C1%29%2C%284%2C-2%29%2C%285%2C5%29%2C%28-2%2C6%29%7D

This gives x^2 as the result.

The other function gives a more complicated result. 

You don't really get to define functions in Wolfram|Alpha, so I'm not sure in what sense you mean you would like to evaluate those. In Mathematica, we would write out the code for f for example as follows:
f[x_]:= x/.{{2->1},{4->-2},{5->5},{-2->6}}

The syntax is the same for g. Once you've written it, you can evaluate f[g[6]] for example. 
POSTED BY: Sean Clarke
Sean Clarke wrote:
"Polynomial interpolating {(2,1),(4,-2),(5,5),(-2,6)}"

http://www.wolframalpha.com/input/?i=Polynomial+interpolating+%7B%282%2C1%29%2C%284%2C-2%29%2C%285%2C5%29%2C%28-2%2C6%29%7D

This gives x^2 as the result.
Strange result -- x^2 is certainly a polynomial, but I don't quite understand how it interpolates the given points.
POSTED BY: Ilian Gachevski
Yep. Completely missed that. Sorry.

From what I can see, it looks like WolframAlpha currently doesn't allow you to interpolate through points using natural language input. It instead treats it as a list of sequential values for interpolation. I'm sorry that I didn't catch that this was going on. 

There is a function in Mathematica for creating interpolating Polynomial called  InterpolatingPolynomial. Luckily for us, it works in Wolfram|Alpha as well:

http://www.wolframalpha.com/input/?i=InterpolatingPolynomial%5B%7B%7B2%2C+1%7D%2C+%7B4%2C+-2%7D%2C+%7B5%2C+5%7D%2C+%7B-2%2C+6%7D%7D%2C+x%5D
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract