Message Boards Message Boards

GROUPS:

Plot 3D Ln(x^2) Function?

Posted 8 months ago
928 Views
|
6 Replies
|
2 Total Likes
|

I am doing a project for my college calculus class. Revolve the region bonded by the graphs of y=0.5Ln(x^2), y=0, y=-0.6, x=0 about then y-axis When I try to use Mathematica to graph the 3d mode, all I get is just a blank cube. Please help me!!! Thank you! enter image description here

6 Replies

You made a syntax mistake.Try:

  RevolutionPlot3D[0.5*Log[x^2], {x, 0, 1}, RevolutionAxis -> {0, 0, 1},PlotStyle -> FaceForm[Red, Blue]]

Create a thick surface for 3D printing:

 RevolutionPlot3D[0.5*Log[x^2], {x, 0.1, 1}, RevolutionAxis -> {0, 0, 1}, PlotTheme -> "ThickSurface", MaxRecursion -> 4]

Regards,MI

Posted 8 months ago

Thank you very much! But I am still confused about 2 questions: (1) We can only use Log function instead of Ln function? (2) How do I set the limit of the height? Because I only want this function's height goes from (y=-0.6 to y=0)

I really appreciate your time!

enter image description here

Log[x] gives the natural logarithm of x and function is builid-in,but we can defining:

Ln[x_] := Log[x];

Limit of the height we can adjust by PlotRange. PlotRange -> {{Range for X}, {Range for Y}, {Range for Z}}

  Ln[x_] := Log[x];
  RevolutionPlot3D[0.5*Ln[x^2], {x, 0, 1}, RevolutionAxis -> {0, 0, 1}, 
  PlotStyle -> FaceForm[Red, Blue], 
  PlotRange -> {Automatic, {-0.6, 0}, Automatic}]

   RevolutionPlot3D[0.5*Ln[x^2], {x, 0, 1}, RevolutionAxis -> {0, 0, 1}, 
   PlotStyle -> FaceForm[Red, Blue], 
   PlotRange -> {{-0.6, 0}, {-0.6, 0}, Automatic}]
Posted 8 months ago

Thank you very much!!!!! You just saved my life! May I ask you the last question? This is a project of Math class to use functions to create a cup. I designed this cup with 7 functions. However, the middle part is just made of the function I asked you before and shifts down some units. So I have trouble with combine all the 7 pieces of functions together. Could you please help me with that? Image 1

Image 2

Image 3

Image 4

A simple way is to write in Piecewise than combine in Show.

ClearAll["Global`*"]; Remove["Global`*"]

f[x_] := Piecewise[{{Sqrt[-x + 1], 0 <= x <= 1}, {-1 + x, 
     1 <= x <= 3/2}, {2 - x, 3/2 <= x <= 2}, {-1 + x/2, 
     2 <= x <= 5/2}, {3/2 - x/2, 5/2 <= x <= 3}, {Sqrt[x - 3], 
     3 <= x <= 7/2}, {1/Sqrt[2], 7/2 <= x <= 5}}];
f2[x_] := 
  Piecewise[{{Sqrt[-x + 1.05], 0 <= x <= 1}, {(x - 1)^2 + 0.05, 
     1 <= x <= 3/2}, {(x - 2)^2 + 0.05, 
     3/2 <= x <= 2}, {(x - 2)^2 + 0.05, 
     2 <= x <= 5/2}, {(x - 3)^2 + 0.05, 
     5/2 <= x <= 3}, {Sqrt[x - 3] + 0.05, 
     3 <= x <= 7/2}, {1/Sqrt[2] + 0.05, 7/2 <= x <= 5}}];
  f3[x_] := 
    Piecewise[{{Sqrt[-x + 1.05], 0 <= x <= 1}, {(x - 1)^3 + 0.05, 
       1 <= x <= 3/2}, {(x - 3/2)^3 + 0.05, 
       3/2 <= x <= 2}, {(x - 2)^2 + 0.05, 
       2 <= x <= 5/2}, {(x - 3)^2 + 0.05, 
       5/2 <= x <= 3}, {Sqrt[x - 3] + 0.05, 
       3 <= x <= 7/2}, {1/Sqrt[2] + 0.05, 7/2 <= x <= 5}}];
  f4[x_] := 
    Piecewise[{{Sqrt[-x + 1.05], 0 <= x <= 1}, {(x - 1) + 0.05, 
       1 <= x <= 3/2}, {-(x - 2) + 0.05, 
       3/2 <= x <= 2}, {(x - 2)^2 + 0.05, 
       2 <= x <= 5/2}, {(x - 3)^2 + 0.05, 
       5/2 <= x <= 3}, {Sqrt[x - 3] + 0.05, 
       3 <= x <= 7/2}, {1/Sqrt[2] + 0.05, 7/2 <= x <= 5}}];

       Ln[x_] := Log[x];
       f5[x_] := 
         Piecewise[{{-Surd[x - 1, 3], 0 <= x <= 1}, {Exp[(x - 1)^2] - 0.95, 
            1 <= x <= 3/2}, {Exp[-(x - 1/2)^2] - 0.05, 
            3/2 <= x <= 2}, {(x - 2)^2 + 0.05, 
            2 <= x <= 5/2}, {(x - 3)^2 + 0.05, 
            5/2 <= x <= 3}, {Exp[(x - 3)^2] - 0.95, 
            3 <= x <= 3 + Sqrt[Ln[39/20]]}, {1, 
            3 + Sqrt[Ln[39/20]] <= x <= 6}}];

 Plot[f4[x], {x, 0, 5}, PlotRange -> {Automatic, {0, 3/2}}, Exclusions -> None]

enter image description here

 RevolutionPlot3D[f[x], {x, 0, 5}, RevolutionAxis -> {1, 0, 0}, 
  Mesh -> None, Axes -> False, Boxed -> False, Exclusions -> None, 
  MaxRecursion -> 5]

  RevolutionPlot3D[f2[x], {x, 0, 5}, RevolutionAxis -> {1, 0, 0}, 
  Mesh -> None, Axes -> False, Boxed -> False, Exclusions -> None, 
 MaxRecursion -> 5]

RevolutionPlot3D[f3[x], {x, 0, 5}, RevolutionAxis -> {1, 0, 0}, 
Mesh -> None, Axes -> False, Boxed -> False, Exclusions -> None, 
MaxRecursion -> 5]

RevolutionPlot3D[f4[x], {x, 0, 5}, RevolutionAxis -> {1, 0, 0}, 
Mesh -> None, Axes -> False, Boxed -> False, Exclusions -> None, 
MaxRecursion -> 5]

RevolutionPlot3D[f5[x], {x, 0, 6}, RevolutionAxis -> {1, 0, 0}, 
 Mesh -> None, Axes -> False, Boxed -> False, Exclusions -> None, 
 MaxRecursion -> 5]

enter image description here

Posted 8 months ago

Thank you very very very very very much!

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