BEFORE TRYING TO SOLVE DIFFERENTIAL EQUATIONS, YOU SHOULD FIRST STUDY
Help Sheet 3: Derivatives & Integrals.
> diff( f, x ) ; gives f '(x)
> diff( f, x$2 ) ; gives f ''(x)
> diff( f, x$3 ) ; gives f (3)(x), etc.
> de := diff(y(x),x$2) + 4*diff(y(x),x) + 13*y(x) = cos(3*x) ;
Note: When defining a differential equation, include the independent variable; for example, enter diff( y(x), x$2 ), not diff( y, x$2 ).
> Y := rhs( dsolve(de, y(x)) );
The solution is called Y.
y(0) = 1, y'(0) = 0
> de := diff(y(x),x$2) + 4*diff(y(x),x) + 13*y(x) = cos(3*x) ;
> Y := rhs( dsolve( { de, y(0) = 1, D(y)(0) = 0 }, y(x) ) ) ;
The solution is called Y.
> plot( Y, x = 0..5, thickness = 4, color = blue ) ;
plots the solution Y from x = 0 to 5
y(0) = 1, y'(0) = 0, y''(0) = 1, y'''(0) = 2
> de := diff(y(x),x$4) + 10*diff(y(x),x$3) +
> 38*diff(y(x),x$2) + 66*diff(y(x),x) +
> 45*y(x) = 4 ;
> Y := rhs( dsolve( { de, y(0) = 1, D(y)(0) = 0,
> D(D(y))(0) = -1, D(D(D(y)))(0) = 2 }, y(x) ) ) ;
The solution is called Y.
> plot( Y, x = 0..5, thickness = 4, color = red ) ;
plots the solution Y from x = 0 to 5
y(0) = 1, y'(0) = 2
where w is a constant parameter.
> de := diff(y(x),x$2) + w^2*y(x) = cos(x) ;
> Y := rhs( dsolve( { de, y(0) = 1, D(y)(0) = -2 }, y(x) ) ) ;
The solution is called Y.
> plot( Y, x = 0..5, thickness = 4, color = green ) ;
produces an error since you did not specify a value for w
> plot( subs( w = 3, Y ), x = 0..5, thickness = 4, color = green ) ;
plots the solution Y from x = 0 to 5 with w set to 3
> with( DEtools ) :
> ?DEtools for a list of commands in the DEtools package
> ?DEplot
> ?DEplot1
> ?DEplot2
> ?phaseportrait
> ?dfieldplot
Of course, not every conceivable differential equation can be solved,
which is why we still need to know Numerical Methods!
> with( inttrans ) :
load the integral transform package
> f := cos(t) ;
defines f as an expression
> F := laplace( f, t, s ) ;
stores the Laplace transform of f in F
> F := s/(s^2-25) ;
defines F as an expression
> f := invlaplace( F, s, t ) ;
stores the inverse Laplace transform of F
in f
> G := s/(s^2-9) ;
defines G as an expression
> g := invlaplace( G, s, t ) ;
stores the inverse Laplace transform of G
in g
> f := Heaviside(t-4) ;
defines f as the unit step function about
t=4
Note: The unit step function is
not U(t-4).
> F := laplace( f, t, s ) ;
stores the Laplace transform of f in F
> f := t^2 * Heaviside(t-4) ;
> F := laplace( f, t, s ) ;
stores the Laplace transform of f in F
> ?inttrans
for a list of commands in the inttrans
package
Written and Maintained by
Last modified: 02/04/2015
Copyright © 19972023 Kevin G. TeBeest. All rights reserved.
Prof. Kevin G. TeBeest
Maple® is a registered trademark of Waterloo Maple Software.
Applied Mathematics
Kettering University