## Homework 6, due October 13, 2011.

Due at noon on Thursday, October 13, 2011 in 365B Fitzpatrick Hall.
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Homework 6, due October 13, 2011.

Reading: Chapter 5 of the course text, sections 5.1-5.3.

Exercises: 4.29, 4.30 (it is allowable to use Matlab for these, but FORTRAN is ok too for these first two problems), 5.3, 5.4 and 5.5. For the problems from Chapter 5, plot your series solutions for an increasing number of terms included in the partial sum. For each case, does the series solution provide a better solution as more terms are included?
Bill Goodwine, 376 Fitzpatrick
jconcelm

### Re: Homework 6, due October 13, 2011.

For question 5.3 part 3, it asks us to compare the power series solution and the general solution. The initial conditions are not given, what conditions should we use to plot the graphs?
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

jconcelm wrote:For question 5.3 part 3, it asks us to compare the power series solution and the general solution. The initial conditions are not given, what conditions should we use to plot the graphs?
Using x(0)=1, x'(0)=1 is fine.
Bill Goodwine, 376 Fitzpatrick
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

I was working on homework 6 and I am having trouble with setting up the equation for problem 4.30 part (1). From the force body diagram and also the information provided throughout the rest of the problem, I set up the following equation: mx''+kx=mu*m*g*(cos(omega*t)+sin(omega*t))+f(t) which I initially thought was correct. However, when I plotted this in MATLAB for part (2), it appeared as a cosine graph with a linearly increasing amplitude. Obviously the amplitude should be linearly decreasing, as you mention in the book. However, I cannot see where I went wrong and can you give me any hints or suggestions as to where I should go from here? Thanks for your time and help.
Your friction force is wrong. Shouldn't it be equal to +/-(mu m g) and have a plus or minus depending on which direction it is moving?
Bill Goodwine, 376 Fitzpatrick
astumpf

### Re: Homework 6, due October 13, 2011.

The ode45 MATLAB code you used in class was for variable-coefficient equations. Can we also use it to solve constant-coefficient equations? Or would you prefer us to do it by hand? Thanks.
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

astumpf wrote:The ode45 MATLAB code you used in class was for variable-coefficient equations. Can we also use it to solve constant-coefficient equations? Or would you prefer us to do it by hand? Thanks.
If your question is "does ode45 work for constant coefficient problems" then the answer is yes. But if the equation is easy for you to solve by hand, that's the way you should do it and then just plot the solution using matlab.
Bill Goodwine, 376 Fitzpatrick
bmcaulif

### Re: Homework 6, due October 13, 2011.

does ode45 allow for if commands or absolute values in the function? I tried to and it wouldn't work. If not how can you change the direction of the friction force without changing its magnitude because it will always be equal to uN? Thanks
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

bmcaulif wrote:does ode45 allow for if commands or absolute values in the function? I tried to and it wouldn't work. If not how can you change the direction of the friction force without changing its magnitude because it will always be equal to uN? Thanks
It should allow for both actually, so if it wasn't working, I don't think it was the absolute value command. You can similarly do it with logical statements like if().
Bill Goodwine, 376 Fitzpatrick
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

I just had a quick question regarding problem 4.30 on homework 6. I might have done it wrong, but I didn't use a computer for part 2, like the problem said i had to. I said that mx" = f(t)-kx +/- mu*m*g where the +/- depended on the direction of travel (opposite of direction of x' ). but with the given values, and f being 0, i have that x"+9x= +/-.981 . For this the homogeneous solution is easy to find, and then the particular is constant, but switches between positive and negative. What assumption/oversimplification am i making that is letting me get an answer without using a program?
What you are doing is fine. However if you want to construct the whole solution, then you would have to start over again each time the sign switches, using the ending value as the new initial condition and patch together a bunch of solutions.
Bill Goodwine, 376 Fitzpatrick
CLillie

### Re: Homework 6, due October 13, 2011.

goodwine wrote:
I just had a quick question regarding problem 4.30 on homework 6. I might have done it wrong, but I didn't use a computer for part 2, like the problem said i had to. I said that mx" = f(t)-kx +/- mu*m*g where the +/- depended on the direction of travel (opposite of direction of x' ). but with the given values, and f being 0, i have that x"+9x= +/-.981 . For this the homogeneous solution is easy to find, and then the particular is constant, but switches between positive and negative. What assumption/oversimplification am i making that is letting me get an answer without using a program?
What you are doing is fine. However if you want to construct the whole solution, then you would have to start over again each time the sign switches, using the ending value as the new initial condition and patch together a bunch of solutions.
If it is done in ode45, does the program accept 'IF' loops for the directionality of the friction?
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

CLillie wrote:
goodwine wrote:
I just had a quick question regarding problem 4.30 on homework 6. I might have done it wrong, but I didn't use a computer for part 2, like the problem said i had to. I said that mx" = f(t)-kx +/- mu*m*g where the +/- depended on the direction of travel (opposite of direction of x' ). but with the given values, and f being 0, i have that x"+9x= +/-.981 . For this the homogeneous solution is easy to find, and then the particular is constant, but switches between positive and negative. What assumption/oversimplification am i making that is letting me get an answer without using a program?
What you are doing is fine. However if you want to construct the whole solution, then you would have to start over again each time the sign switches, using the ending value as the new initial condition and patch together a bunch of solutions.
If it is done in ode45, does the program accept 'IF' loops for the directionality of the friction?
Look above.
Bill Goodwine, 376 Fitzpatrick
dmasse1

### Re: Homework 6, due October 13, 2011.

goodwine wrote:
jconcelm wrote:For question 5.3 part 3, it asks us to compare the power series solution and the general solution. The initial conditions are not given, what conditions should we use to plot the graphs?
Using x(0)=1, x'(0)=1 is fine.

is it necessary to plot these solutions to show they are the same or can this be done numerically?
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact:

### Re: Homework 6, due October 13, 2011.

dmasse1 wrote:
goodwine wrote:
jconcelm wrote:For question 5.3 part 3, it asks us to compare the power series solution and the general solution. The initial conditions are not given, what conditions should we use to plot the graphs?
Using x(0)=1, x'(0)=1 is fine.

is it necessary to plot these solutions to show they are the same or can this be done numerically?
Just somehow show the power series solution is converging to the real solution. However you do that is ok with me.
Bill Goodwine, 376 Fitzpatrick
goodwine
Posts: 1596
Joined: Tue Aug 24, 2004 4:54 pm
Location: 376 Fitzpatrick
Contact: