De Linear Systems

Description

Here is Sage cell that plots $\sin x$ for $-10 \leq x \leq 10$.

Sage Cell

Code

t = var('t')
x = function('x')(t)
y = function('y')(t)
@interact
def _(f = input_box(default = 3*x - 2*y),
      g = input_box(default = x + y),
      t_start = input_box(default = 0), x_start = input_box(default = 1), y_start = input_box(default = 1)):
    de1 = diff(x,t) == f
    de2 = diff(y,t) == g
    sol = desolve_system([de1, de2], [x,y], ics=[t_start, x_start, y_start])
    sol[0].show()
    sol[1].show()
    html(r"$\displaystyle\frac{dx}{dt} = %s$"  %latex(f))
    html(r"$\displaystyle\frac{dy}{dt} = %s$"  %latex(g))

Options

Option

Adding axes labels

Code

plot(sin(x),-10,10)

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 21 Dec 2019 15:21

Submitted by: Tom Judson

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License