Can Mathematica Plot Functions with Undefined Parameters?

LocationX
Messages
141
Reaction score
0
General question regarding mathematica. I am trying to make a plot of A Sin(\omega t - \pi / 2) but it seems that mathematica cannot plot this graph without having A and omega defined. Is there a way to have mathematica plot this given the variable A and frequency omega?

Basically, instead of plotting it on a number line, would mathematica be able to label the y-axis in terms of A (instead of 1, 2, 3...) and also label the x-axis with omega instead of pi, 2pi, .. etc.

Currently using:
Plot[A Sin[\[Omega] t - \[Pi]/2] , {t, 0, 6 Pi}]
 
Physics news on Phys.org


What I usually do is fix some values for A and omega and adjust the axes accordingly. For example, try something like this

Code:
  y[t_] := A Sin[\[Omega] t - \[Pi]/2]
Block[{A = 1, \[Omega] = 2},
 Plot[y[t], {t, 0, 10 \[Omega]}, 
  Ticks -> {Table[{j \[Omega], j "\[Omega]"}, {j, 0, 10}], 
    Table[{k A, k "A"}, {k, -1, 1, 0.25}]}]
 ]

Note the use of Ticks, which puts different marks on the axes, and how I used Table to make precisely those marks that I want.

I hope the code is self-explanatory, otherwise I am counting on your questions :)
 
##|\Psi|^2=\frac{1}{\sqrt{\pi b^2}}\exp(\frac{-(x-x_0)^2}{b^2}).## ##\braket{x}=\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dx\,x\exp(-\frac{(x-x_0)^2}{b^2}).## ##y=x-x_0 \quad x=y+x_0 \quad dy=dx.## The boundaries remain infinite, I believe. ##\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dy(y+x_0)\exp(\frac{-y^2}{b^2}).## ##\frac{2}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,y\exp(\frac{-y^2}{b^2})+\frac{2x_0}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,\exp(-\frac{y^2}{b^2}).## I then resolved the two...
It's given a gas of particles all identical which has T fixed and spin S. Let's ##g(\epsilon)## the density of orbital states and ##g(\epsilon) = g_0## for ##\forall \epsilon \in [\epsilon_0, \epsilon_1]##, zero otherwise. How to compute the number of accessible quantum states of one particle? This is my attempt, and I suspect that is not good. Let S=0 and then bosons in a system. Simply, if we have the density of orbitals we have to integrate ##g(\epsilon)## and we have...
Back
Top