Lab 7

James Cole

(1)IsEq .  (1.1  .1)still a differential equation if the velocityv(t) is given and the forceF(t) is the unknown function?	m \[DifferentialD]v/\[DifferentialD]t  =  F(
                t).

dv = mF (t) dt

(2)Determine by substitution whether the following functions satisfy the given differential equation,and if so,state whether the functions are a general solution to the equation:
(a) (((\[DifferentialD]^2) 
                    x)/(\[DifferentialD](t^2)))=x(t),
      x(
              t) = (Subscript[C, 1]) sinh(
                  t)  +  (Subscript[C, 2]) (E^(-t)).

Clear[X]

X[t_] := C1 Sinh[t] + C2 Exp[-t]

D[X[t], {t, 2}]

X[t]

(b) (((((\[DifferentialD]x)/(\[DifferentialD]t))))^2)=x(t),x(t) = (1/4) ((a^2) + (t^2)) - ((a t)/2)

Clear[X]

X[t_] := 1/4 ((a^2) + (t^2)) - ((a t)/2)

(((D[X[t], t]))^2) // Factor

X[t] // Factor

(c)  (((\[DifferentialD]^4) x)/(\[DifferentialD](t^4)))-3 (((\[DifferentialD]^3) 
                    x)/(\[DifferentialD](t^3)))-7 (((\[DifferentialD]^2) 
                    x)/(\[DifferentialD](t^2)))+15 ((\[DifferentialD]x)/(\[DifferentialD]t))+18 x=12 (t^2),  x(t) = 
          a (E^(3 t)) t + 
            b (E^(-2 t)) + ((2 (t^2))/3) - ((10 t)/9) + (13/9)

Clear[X]

X[t_] := 
      a (E^(3 t)) t  + 
        b (E^(-2 t)) + ((2 (t^2))/3) - ((10 t)/9) + 
        (13/9)

X[t] // Factor

D[X[t], {t, 4}] - 3 D[X[t], {t, 3}] - 7 D[X[t], {t, 2}] + 
        15 D[X[t], t] + 18 X[t] // Factor

12 (t^2)   Given in (c)

(3)Prove by substitution that the following functions are general solutions to the given differential equations,and find values for the undetermined constants in order to match the boundary or initial conditions . 
          Plot the solutions:

(a) ((\[DifferentialD]x)/(\[DifferentialD]t))=5 x(t) - 3, x(0) = 1;  x(t) = C (E^(5 t)) + 3/5.

Clear[X]

X[t_] := c (E^(5  t)) + 3/5

p1 = D[X[t], t]

X[t] // Factor

Plot[p1, {t, 0, 5}]

(b) (((\[DifferentialD]^2) 
                    x)/(\[DifferentialD](t^2)))+4((\[DifferentialD]x)/(\[DifferentialD]t))+4 x(t)=0, x(0) = 0,(x^′)(1) = -3;x(t) = 
            (Subscript[C, 1]) (E^( -2 t))  + (Subscript[C, 2]) t (E^(-2 t)) .

Clear[X]

X[t_] := a (E^(-2 t)) + b t (E^(-2 t))

X[0] := 0

X[t]

X[1]

X'[1]

D[X[t], {t, 2}] + 4 X'[t]  + 4 X[t] // Factor

(c)(((\[DifferentialD]^3) 
                    x)/(\[DifferentialD](t^3)))+((\[DifferentialD]x)/(\[DifferentialD]t))=t, x(0) = 0, (x^′)(0) = 1,(x^″)(π) = 0;  
            x(t) = (t^2)/
                  2 + (Subscript[C, 1]) Sin t + (Subscript[C, 2]) Cos t + (Subscript[C, 3]) .

Clear[X]

X[t_] :=  t^2 /2   + a Sin[t]  + b Cos[t]  + c

X[t]

X'''[t] + X'[t]

2.  Plot the vector {x, 
        y} with Plotvectorfield command.

<< Graphics`

F[x_, y_] := {x, y}

PlotVectorField[{x, y}, {x, -5, 5}, {y, -5, 5}]

3.  plot the direction field for (dy/dt)  = t - y

P1 = PlotVectorField[{1, t - y}, {t, 0, 4}, {y, -3, 3}]

4.

Y[t_] := a E^-t  + t - 1

Y[t] /.  a -> { 4, 2, 1, -2}

P2 = 
      Plot[{Y[t] /.  a -> { 4}, Y[t] /.  a -> {2}, 
          Y[t] /.  a -> {1}, Y[t] /.  a -> {-2}}, {t, 0, 
          4}]

Show[P1, P2]

5.

(2)Plot the direction field for the following differential equations in the given ranges,and discuss the qualitative behavior of solutions for initial conditions in the given ranges ofy:

(a)	((\[DifferentialD]y)/(\[DifferentialD]t))=(Sqrt[t]) y,0 < t <  4,   -2 < y < 2.

(dy/dt) = f[t, 
            y]                         {dt, 
            dy} = dt {1, (dy/dt)} = dt {1, f[t, y]}

P3 = 
      PlotVectorField[{1, (Sqrt[t]) y}, {t, 0, 4}, {y, -2, 2}, 
        Axes ->  True, 
        AxesLabel -> { "t", "y"}]

the field bends up resembling (Sqrt[y ]) when y is positive ,  
    when y is negative the field bends down resembling (Sqrt[ 
            y]).

(b)	((\[DifferentialD]y)/(\[DifferentialD]t))=sin(t + y) ,0 < t < 15, -8 < t < 8

PlotVectorField[{1, Sin[t + y]}, {t, 0, 15}, {y, -8, 8}, 
      Axes ->  True, AxesLabel ->  {"t", "y"}]

The field is somewhat chaotic, 
    but I can kind of see a sinusoidal patern over time.

6.  Use DSolve command on eqn .  
        in problem 3

    
(dy/dt) = t - y

Clear[y]

DSolve[y'[t] == t - y[t], y[t], t]

7.  Use DSolve to solve (( (d^2) y)/(dt^2)) = -(ω^2) y  for y[0] = 4,  
    and y'[0] = 6.  plot solution for ω = 1

DSolve[{y''[t] == -ω^2  y[t], 
        y[0] == 4, y'[0] == 6}, y[t], t]

{{y[
              t] -> ((2 (2 ω Cos[t ω] + 3 Sin[t ω]))/ω)}} /. ω ->  1

y[t_] = 2 (2 Cos[t]  + 3 Sin[t])

Plot[y[t], {t, 0, 4}]