Graphing with Mathematica and Parameters

In summary, to complete the second part of Part C, you need to use Mathematica to draw graphs for a few values of the parameters. This can be done by assigning the parameters using your preferred method, such as using the "Block" function or using a list of values for the parameters. This will allow you to plot multiple graphs in the same plot.
  • #1
Automaton2000
2
0

Homework Statement



Problem.jpg


Second part of Part C is: Use mathematica to draw graphs for a few values of the parameters. [ Consider the cases b > 0 and b< 0]

Homework Equations


I think you use the answer to Part A
PartA.jpg




The Attempt at a Solution


Not sure how to graph with mathematica with parameters
 
Physics news on Phys.org
  • #2
You don't, that's why it says "for a few values of the parameters."

So you can use your favorite method to assign the parameters,
varying from the ugly
Code:
a = 1;
b = -1;
A = 6;
Plot[P[t], {t, .., ...}]
or the better
Code:
Block[
 {a = 1, b = -1, A = 6},
 Plot[P[t], {t, .., ...}]
]
to my preferred
Code:
Plot[P[t] /. {a -> 1, b -> -1, A -> 6}, {t, .., ...}]

Using something like
Code:
Plot[P[t] /. {a -> {1, 2, 3, 4}, b -> 1, A -> -2} // Evaluate, {t, 1, 
  6}]
you can even plot multiple ones in the same plot.
 

What is Mathematica and how is it used for graphing?

Mathematica is a software program used for mathematical and scientific calculations, including graphing and visualization. It allows users to input mathematical expressions and equations, manipulate them, and generate visual representations, such as graphs and charts.

How do I graph a function with parameters in Mathematica?

To graph a function with parameters in Mathematica, you can use the Plot function and specify the parameters as variables. For example, if you have a function f(x,a) = ax^2, you can plot it by using Plot[a*x^2, {x, -5, 5}] and then manipulate the value of a to see how it affects the graph.

Can I add multiple parameters to a graph in Mathematica?

Yes, you can add multiple parameters to a graph in Mathematica by using the Plot3D function. This allows you to plot a function with two independent variables, such as f(x,y,a) = ax^2 + y^2. You can then manipulate the values of a to see the effect on the 3D graph.

How can I customize the appearance of my graphs in Mathematica?

Mathematica offers a variety of options for customizing the appearance of graphs, such as changing the color, style, and size of lines and points, adding labels and titles, and adjusting the axes and grid lines. You can use the PlotStyle, AxesLabel, and GridLines commands, among others, to modify the appearance of your graphs.

Can I export my graphs from Mathematica to other formats?

Yes, you can export your graphs from Mathematica to various file formats, including PDF, PNG, and SVG. This allows you to use your graphs in presentations, reports, or other documents outside of Mathematica. You can use the Export command to save your graphs in the desired format.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
660
  • Calculus and Beyond Homework Help
Replies
2
Views
684
  • Calculus and Beyond Homework Help
Replies
2
Views
3K
Replies
1
Views
478
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
746
  • Calculus and Beyond Homework Help
Replies
1
Views
481
  • Precalculus Mathematics Homework Help
Replies
6
Views
609
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
Back
Top