Skip to content

Commit

Permalink
Make calculus doctests pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Sep 30, 2024
1 parent 1f12eea commit 06a3a28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _class-notes/calculus.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ and get the second equation:
Now to solve the first equation to obtain a value for $b$:

>>> sym.solveset(first_equation, b)
FiniteSet(0)
{0}

Now to substitute that value for \$a\$ (note that this is not necessary)
and solve the second equation for \$a\$:
Expand All @@ -87,7 +87,7 @@ and solve the second equation for \$a\$:
We can solve this:

>>> sym.solveset(second_equation, a)
FiniteSet(-5/2)
{-5/2}

Substituting these back:

Expand Down Expand Up @@ -171,7 +171,7 @@ The solution approach:
>>> g = sym.cos(x) * sym.sin(x)
>>> turning_points_of_f = sym.solveset(sym.diff(f, x), x)
>>> turning_points_of_f
FiniteSet(I, -I)
{-I, I}
>>> turning_points_of_g = sym.solveset(sym.diff(g, x), x)
>>> turning_points_of_g
Union(ImageSet(Lambda(_n, _n*pi + pi/4), Integers), ImageSet(Lambda(_n, _n*pi + 3*pi/4), Integers))
Expand Down

0 comments on commit 06a3a28

Please sign in to comment.