Sagemath



Consider the following system of linear differential equations:

  1. Sagemath Python
  2. Sagemath.org
  3. Sagemathcloud
  4. Sagemath Latex Output

SageMath ebuilds are not present in the Funtoo portage tree. Instead these are available through separate overlays (repositories). To install SageMath on Funtoo Linux the overlay sage-on-gentoo is required, together with dependencies found in the overlay science. I have a very big rational function and i want to obtain the numerator and denominator. With.numeratordenominator it takes forever with.numeratordenominator(False) not every term is expanded. With.expand and.combine it takes forever and the result is not a single fraction. I need a single fraction N(x)/D(x) where N and D are polynomials in x, it is not important how big! SageMath is a giant project in the field of open source scientific packages. It is a collection of more than 80 different open source projects integrated into a single user interface with Python as the language that connects everything. SageMath was to be used for research and teaching of pure and applied mathematics, but that does not mean that it can not be used in other areas of science. SageMath is an open source mathematics software system. SageMath is built on the foundation of many existing open source packages such as matpoltib, NumPy and many more. SageMath combines all these open software packages through a python-based language or directly via wrappers and interfaces. SageMath provide users with a user interface principle that provides question and answer feature that.

$x' = -x -y$

$y' = -2y$

We will graph the vector field for this system of differential equations, the lines containing the eigenvectors, and four solutions to the differential equation.

Drivers citibank. First, let us find the eigenvectors for this sytem of differential equations:

Guitar chords progression. Eigenvector for $lambda = -2$:

This means we have an eigenvector of $mathbf{v}_{1} = left[begin{array}{r}1 1end{array}right]$

Eigenvector for $lambda = -1$:

This means we have an eigenvector of $mathbf{v}_{2} = left[begin{array}{r} 1 0end{array}right]$

Now we will enter our differential equation into Sage:

t = var('t')x = function('x')(t)y = function('y')(t)de1 = diff(x,t) +x+y 0de2 = diff(y,t) +2*y 0

Next, we will have Sage create graphs p1, p2, p3, and p4, for four solutions to the differential equation, with an initial condition from each quadrant. In this case we are using initial conditions (ics=$[t_{0},x_{0},y_{0}]$) of $mathbf{x}(0) = left[begin{array}{r} 1 2end{array}right]$, $mathbf{x}(0) = left[begin{array}{r} -1 1end{array}right]$, $mathbf{x}(0) = left[begin{array}{r} -1 -2end{array}right]$, and $mathbf{x}(0) = left[begin{array}{r} 1 -1end{array}right]$.

sol1 = desolve_system([de1, de2], [x,y], ics=[0,1,2])soln1x, soln1y = sol1[0].rhs(), sol1[1].rhs()p1=parametric_plot((soln1x,soln1y),(-.5,1.5))sol2=desolve_system([de1, de2], [x,y], ics=[0,-1,1])soln2x, soln2y = sol2[0].rhs(), sol2[1].rhs()p2=parametric_plot((soln2x,soln2y),(-.5,1.5))sol3=desolve_system([de1, de2], [x,y], ics=[0,-1,-2])soln3x, soln3y = sol3[0].rhs(), sol3[1].rhs()p3= parametric_plot((soln3x,soln3y),(-.5,1.5))sol4=desolve_system([de1, de2], [x,y], ics=[0,1,-1])soln4x, soln4y = sol4[0].rhs(), sol4[1].rhs()p4= parametric_plot((soln4x,soln4y),(-.5,1.5))

Then we will have Sage create graphs p5 and p6 for the lines contaning the eigenvectors $mathbf{v}_{1} = left[begin{array}{r} 1 1end{array}right]$ and $mathbf{v}_{2} = left[begin{array}{r} 1 0end{array}right]$ .

p5=parametric_plot((t,t),(-5,5))p6=parametric_plot((t,0),(-5,5))

Next, we will have Sage create a plot of the vector field corresponding to the system of differential equations for p7. To make it easier to see the vector field, it helps to divide the terms by the length of the vector field so all of the vectors are length one

Sagemath Python

var('x,y')n=sqrt((x+y)^2+(2*y)^2)p7=plot_vector_field( ((x+y)/n, (2*y)/n), (x,-5,5), (y,-5,5) )

Finally, we will have Sage graph all of the solution curves and the vector field on the same axes. You may need to change your initial conditions or the $t$-range for the graph of the solution curve.

Extensive open-source scientific package
SageMath is a giant project in the field of open source scientific packages. It is a collection of more than 80 different open source projects integrated into a single user interface with Python as the language that connects everything. SageMath was to be used for research and teaching of pure and applied mathematics, but that does not mean that it can not be used in other areas of science and engineering.


Additional information

  • 8.9
  • 2019-10-26
  • 672
  • Free
  • 863.8MB
  • Windows 7+
  • Free Developer Tools/ Programming languages
  • filename
Back
Sagemath

Download SageMath latest version

You may like


Sagemath

Other versions

Sagemath.org

Old versions SageMath

Last scanned on

Virus scan report
App has been reported safe after being scanned by certified virus scanners via Google VirusTotal
Sagemath

Sagemathcloud


SHA256
File type
Read more detailed scan report on VirusTotal..

Sagemath Latex Output

Back




Comments are closed.