Plotting problem with Mathematica 8

In summary, the conversation is about a person seeking help with a problem from a math book and their attempt at solving it using Mathematica. They have tried using the "Bottom" option for Filling, but it did not give the desired output. They also mention other options such as "Top" and "Axis" but are unsure of how they would look and why they are not suitable. The person then shares that the author has posted all the solutions on their website.
  • #1
issacnewton
1,000
29
Hi

I am trying to do some problem from the book "Student's Introduction to Mathematica" 2ed.
I have shown the snapshot of the problem in 1.png. My attempt is a snapshot in 2.png.
Please suggest some ways to do this correctly.

thanks
 

Attachments

  • 1.png
    1.png
    16.1 KB · Views: 423
  • 2.png
    2.png
    9.2 KB · Views: 423
Physics news on Phys.org
  • #2
Have you tried looking at the options for Filling?
 
  • #3
Yes, I have looked into the options of Filling. I have used "Bottom" in my attempt. Other
Filling options are Top and Axis. But they don't give the desired output.
 
  • #4
What does 'Axis' look like? Why isn't it what you want?
 
  • #5

Attachments

  • 1.png
    1.png
    7.9 KB · Views: 465

1. How do I plot a function in Mathematica 8?

To plot a function in Mathematica 8, you can use the Plot function. For example, to plot the function y = x^2, you can use the command Plot[x^2, {x, -5, 5}]. This will plot the function from x = -5 to x = 5. You can also customize the plot by adding options such as changing the color or adding a legend.

2. Can I plot multiple functions on the same graph?

Yes, you can plot multiple functions on the same graph in Mathematica 8. To do this, you can use the command Plot[{f1, f2, f3}, {x, xmin, xmax}] where f1, f2, and f3 are the functions you want to plot and xmin and xmax specify the range of x values. You can also add options to customize the plot, such as adding different colors or legends for each function.

3. How do I add labels and titles to my plot?

To add labels and titles to your plot in Mathematica 8, you can use the commands PlotLabel, AxesLabel, and FrameLabel. For example, to add a title to your plot, you can use the command PlotLabel -> "My Plot Title". To add labels for the x and y axes, you can use the commands AxesLabel -> {"x-axis label", "y-axis label"} or FrameLabel -> {"x-axis label", "y-axis label"} if you want to add a frame around your plot.

4. Can I change the style of my plot?

Yes, you can change the style of your plot in Mathematica 8 by using options such as PlotStyle, GridLines, and PlotTheme. For example, you can use the command PlotStyle -> "Dashed" to change the style of your plot to a dashed line, or use the command GridLines -> Automatic to add grid lines to your plot. You can also use different plot themes, such as "Scientific" or "Classic", to change the overall style of your plot.

5. How do I save my plot as an image or PDF?

To save your plot as an image or PDF in Mathematica 8, you can use the command Export. For example, to save your plot as a PNG image, you can use the command Export["myplot.png", plot], where "myplot" is the name you want to give to your image file and plot is the name of your plot. You can also use the same command to save your plot as a PDF file by changing the file extension to ".pdf".

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
399
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
245
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top