-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (91 loc) · 8.21 KB
/
index.html
File metadata and controls
125 lines (91 loc) · 8.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenStax Physics</title>
<link rel="stylesheet" type="text/css" href="textbook_files/the-style-epub.css"/>
<!-- Add these three lines to add code chunk availability -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/pyodide/v0.27.2/full/pyodide.js"></script>
<script type="module" src="code-chunk-resources.js"></script>
</head>
<body>
<h1>OpenStax Physics (with Python)</h1>
<p><i>University Physics</i> is a three-volume collection that meets the scope and sequence requirements for two- and three-semester calculus-based physics courses. <a href="textbook_files/university-physics-volume-1.toc.html">Volume 1</a> covers mechanics, sound, oscillations, and waves. <a href="textbook_files/university-physics-volume-2.toc.html"><i>Volume 2</i></a> covers thermodynamics, electricity and magnetism, and <a href="textbook_files/university-physics-volume-3.toc.html"><i>Volume 3</i></a> covers optics and modern physics. This textbook emphasizes connections between theory and application, making physics concepts interesting and accessible to students while maintaining the mathematical rigor inherent in the subject. Frequent, strong examples focus on how to approach a problem, how to work with the equations, and how to check and generalize the result.<br></p>
<ul>
<li><a href="textbook_files/university-physics-volume-1.toc.html">Volume 1 Table of Contents</a></li>
<li><a href="textbook_files/university-physics-volume-2.toc.html">Volume 2 Table of Contents</a></li>
<li><a href="textbook_files/university-physics-volume-3.toc.html">Volume 3 Table of Contents</a></li>
</ul>
<p> This version of OpenStax is a custom version hosted by BYU-Idaho Physics Department. It has been modified to include computational methods exercises.
The text features imbedded python code cells that run in-browser so students have no need to install python on their computers. This version of OpenStax University Physics
was copied March 2025. Any changes made to the University Physics textbooks since then may not be reflected in this version of the text. The live OpenStax text can be found <a href="https://openstax.org/details/books/university-physics-volume-1">here (for volume 1).</a>
</p>
<p>A summary of the Python material covered in this modification of the text is found <a href="textbook_files/pythonchapter_index.html">here.</a></p>
<div><h3 class="author-heading">Contributing Authors</h3><div class="loc-nonsenior-author">Stephen D. Druger, Northwestern University</div><div class="loc-nonsenior-author">David Anderson, Albion College</div><div class="loc-nonsenior-author">Daniel Bowman, Ferrum College</div><div class="loc-nonsenior-author">Gerald Friedman, Santa Fe Community College</div><div class="loc-nonsenior-author">Edw. S. Ginsberg, University of Massachusetts</div><div class="loc-nonsenior-author">Kenneth Podolak, Plattsburgh State University</div><div class="loc-nonsenior-author">Takashi Sato, Kwantlen Polytechnic University</div><div class="loc-nonsenior-author">David Smith, University of the Virgin Islands</div><div class="loc-nonsenior-author">Joseph Trout, Richard Stockton College</div><div class="loc-nonsenior-author">Kevin Wheelock, Bellevue College</div><div class="loc-nonsenior-author">Dedra Demaree, Georgetown University</div><div class="loc-nonsenior-author">Richard Ludlow, Daniel Webster College</div><div class="loc-nonsenior-author">Patrick Motl, Indiana University Kokomo</div><div class="loc-nonsenior-author">Lev Gasparov, University of North Florida</div><div class="loc-nonsenior-author">Lee LaRue, Paris Junior College</div><div class="loc-nonsenior-author">Mark Lattery, University of Wisconsin</div><div class="loc-nonsenior-author">Tao Pang, University of Nevada, Las Vegas</div><div class="loc-nonsenior-author">Alice Kolakowska, University of Memphis</div></div>
<div><h3 class="author-heading">Senior Contributing Authors</h3><div class="loc-senior-author">William Moebs, Formerly of Loyola Marymount University</div><div class="loc-senior-author">Samuel J. Ling, Truman State University</div><div class="loc-senior-author">Jeff Sanny, Loyola Marymount University</div></div>
<div>Code support written by Addison Ballif.</div>
<br>
<p>
This work is based on the original textbook
<a href="https://openstax.org/details/books/university-physics-volume-1" target="_blank" rel="noopener noreferrer">
University Physics</a> by OpenStax, licensed under
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer">
CC BY 4.0</a>.
This version has been modified by Brigham Young University - Idaho, Physics Department.
The original work is available at
<a href="https://openstax.org/details/books/university-physics-volume-1" target="_blank" rel="noopener noreferrer">
openstax.org</a>.
</p>
<p>For help on editing the text, see <a href="howto/modifying-the-text.html">here.</a></p>
<h3>Python Cell Demonstration</h3>
<p>Throughout the text are python cells similar to that shown below. </p>
<p>This text uses pyodide and code-mirror to make python runnable from the browser. Below is an example of the code cells that can be embedded throughout the text. </p>
<python-code-cell>
# import the array from numpy
from numpy import array
# create an array vector
A = array([91.8, -131.1])
B = array([173.2, 100.0])
C = array([-114.7, 80.3])
print(A, B, C)</python-code-cell>
<p>Here is another code cell that features matplotlib support.</p>
<python-code-cell>
from matplotlib import pyplot as plt
plt.clf()
plt.plot([1,2,3,4,5])
plt.show()
</python-code-cell>
<p>Look for these chode cells throughout the text and think about how they can
make physics more interesting.
</p>
<p>P.S. You can also have equations like
<span class="os-math-in-para"><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mover><mi>H</mi><mo stretchy="false">^</mo></mover><mi>ψ</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mi>E</mi><mi>ψ</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></math></math></span>
or you can put them on their own line like so
<span class="os-math-in-para"><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo>∇</mo><mi>×</mi><mi mathvariant="bold">E</mi><mo>=</mo><mfrac><mrow><mo>∂</mo><mi mathvariant="bold">B</mi></mrow><mrow><mo>∂</mo><mi>t</mi></mrow></mfrac><mo>.</mo></mrow></math></span>
Hopefully that is useful.
</p>
<p>We can also have animated "manipulate" style plots. </p>
<python-code-cell>from numpy import sin
# define a (wave) function to animate
omega = 1
k = 1
phi0 = 0
A = 2
def f(x, t):
return A*sin(k*x - omega*t + phi0)
# plot it with the Manipulate function
Manipulate(f, xlim=(-10, 10), ylim=(-3, 3), tlim=(0, 10))
</python-code-cell>
<!-- These scripts run at the end of the file to make code cells work -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/codemirror.min.js"
integrity="sha512-XMlgZzPyVXf1I/wbGnofk1Hfdx+zAWyZjh6c21yGo/k1zNC4Ve6xcQnTDTCHrjFGsOrVicJsBURLYktVEu/8vQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.63.3/mode/python/python.min.js"
integrity="sha512-/mavDpedrvPG/0Grj2Ughxte/fsm42ZmZWWpHz1jCbzd5ECv8CB7PomGtw0NAnhHmE/lkDFkRMupjoohbKNA1Q=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="module" src="initialize-pyodide-chunks.js"></script>
</body>
</html>