Plotting f (x, y) = ln(x^2 + y^2 ) - Mathematica Help

In summary, the conversation is about creating a three-dimensional plot of the function ln(x^2 + y^2) using the Plot3D and ParametricPlot3D commands in Mathematica. The goal is to make the plot symmetric in both x and y axes. This can be achieved by specifying the same values for xmin and ymin, or by using the cylindrical coordinate system in ParametricPlot3D.
  • #1
kash-k
17
0
I'm trying to plot this
f (x, y) = ln(x^2 + y^2 )

any one got a idea how to?
 
Mathematics news on Phys.org
  • #2
Plot3D[f, {x, xmin, xmax}, {y, ymin, ymax}]
make a three-dimensional plot of f as a function of the
variables x and y
 
  • #3
More accurately,

Plot3D[Log[x^2 + y^2], {x, xmin, xmax}, {y, ymin, ymax}]

or

f[x_,y_]=Log[x^2 + y^2]
Plot3D[f[x,y], {x, xmin, xmax}, {y, ymin, ymax}]
 
  • #4
i want to make this symmetric in both x and y with 2 graph by using the cartesian coordinate system with the plot3D command and secondly using the cyclindrical coordinate system using the parametricplot3d command. been a long time since I've used mathematica but i don't think your codes does the above right?
 
  • #5
anyone ?
 

1. What is the purpose of plotting f(x, y) = ln(x^2 + y^2) in Mathematica?

The purpose of plotting this function is to visualize the behavior of the natural logarithm of the sum of the squares of the variables x and y. This can help in understanding the relationship between the variables and how the function changes as x and y vary.

2. How can I plot this function in Mathematica?

To plot f(x, y) = ln(x^2 + y^2), you can use the Plot3D function in Mathematica. This will create a 3D plot of the function, with the x and y variables as the independent axes and the natural logarithm of the sum of their squares as the dependent axis.

3. What is the range of values for x and y in this function?

The range of values for x and y in this function is all real numbers except for 0, as the natural logarithm of 0 is undefined. However, it is common to restrict the range to positive values only, as the function is undefined for negative values.

4. How can I change the appearance of the plot in Mathematica?

You can change the appearance of the plot by using various options in the Plot3D function, such as changing the color, axes labels, and adding a legend. You can also use different types of plots, such as a contour plot or a density plot, to visualize the function in different ways.

5. Can I plot this function in 2D instead of 3D?

Yes, you can plot this function in 2D using the Plot function in Mathematica. This will create a 2D plot of the function, with either x or y as the independent axis and the natural logarithm of the sum of their squares as the dependent axis. However, keep in mind that this will not show the full relationship between the two variables, as it will only show the function at a specific point in the other variable.

Similar threads

  • General Math
Replies
5
Views
310
Replies
3
Views
578
Replies
3
Views
736
  • General Math
Replies
11
Views
277
Replies
17
Views
2K
  • General Math
Replies
7
Views
391
Replies
2
Views
1K
  • General Math
Replies
1
Views
693
  • General Math
Replies
5
Views
821
Replies
1
Views
838
Back
Top