Graphing with Mathematica and Parameters

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
Automaton2000
Messages
1
Reaction score
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
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.