Fitting a function in mathematica

Click For Summary
SUMMARY

The discussion focuses on optimizing a constant variable x in the function f(x,y) to fit a graph of f versus y using Mathematica. A specific example provided is f(x,y) = (xy)^3, where given f(x,y) = 14 and y = π/2, the value of x can be calculated as x = 14^(1/3) / (π/2). The recommended Mathematica functions for this task are Solve and Plot, which facilitate finding the optimal x value and visualizing the relationship between f and y.

PREREQUISITES
  • Understanding of functions and variables in mathematics
  • Familiarity with Mathematica software
  • Knowledge of plotting functions in Mathematica
  • Basic algebra for solving equations
NEXT STEPS
  • Explore the Mathematica function Solve for equation solving
  • Learn how to use the Plot function in Mathematica for graphing
  • Study optimization techniques in Mathematica
  • Investigate the implications of variable dependencies in multivariable functions
USEFUL FOR

Mathematics students, data analysts, and anyone using Mathematica for function optimization and graphing tasks.

elionix
Messages
15
Reaction score
0
Say I have a function:

f(x,y)

I have values for f and y such that I can make a plot of f vs y... however, from the values of f and y, I am interested in finding what x is. The x value should be a constant that is optimized to fit the f vs y graph.

Is there a way I can do this in mathematica?

Thank you for any advice!
 
Physics news on Phys.org
Okay, I'm a bit confused by your problem.

you mean, taking a specific example, for instance f(x,y)=(xy)^3? Then, if you know for instance f(x,y)=14 and y=pi/2, that x should be \frac{14^{1/3}}{pi/2}. Using that you can then see that f(x,y)=f(y)=(\frac{14^{1/3}}{pi/2} y)^3. Trying the mathematica functions Solve and Plot should get you on your way.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K