Holooly Plus Logo

Question 1.9.3: Solve Example 1.9.2 using the Mathematica program....

Solve Example 1.9.2 using the Mathematica program.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

The Mathematica program uses an iterative method to compute the solution and accepts the second-order form of the equation of motion. The text after the prompt \boxed{\textsf{In[1]:=}} is typed by the user and returns the solution stored in the variable \boxed{\textsf{x[t]}}. Mathematica has several equal signs for different purposes. In the argument of the NDSolve function, the user types in the differential equation to be solved, followed by the initial conditions, the name of the variable (response), and the name of the independent variable followed by the interval over which the solution is sought. NDSolve computes the solution and stores it as an interpolating function; hence the code returns the plot following the output prompt \boxed{\textsf{Out[1]=}}. The plot command requires the name of the interpolating function returned by NDSolve, \boxed{\textsf{x[t]}} in this case, the independent variable, \boxed{\textsf{t}}, and the range of values for the independent variable.

In[1]:=
NDSolve[{x”[t]+(1/3)*x'[t]+(2/3)*x[t]==0,x'[0]==0.25,x[0]==0},
x,{t,0,20}];
Plot[Evaluate[x[t]/.%],{t,0,20}]
Out[1]={{x–>InterpolatingFunction[{{0.,20.}},<>]}}
Out[2]=
1.9.3 ans

Related Answered Questions

Question: 1.10.3

Verified Answer:

The pendulum equation in state-space form is given...
Question: 1.9.4

Verified Answer:

The Mathcad program uses a fixed time step Runge–K...
Question: 1.8.1

Verified Answer:

Assume that the springs are undeflected when in th...