NewtonianAlch said:
Homework Statement
I'm having trouble with part b and part d, where there is some kind of ramp function involved
http://img845.imageshack.us/img845/7507/76500775.jpg
The Attempt at a Solution
For part b, I calculated the gradient of that ramp, and the intercept which gives y = -x + 4, which would mean it's the function (t - 4)
The other parts of the function are 2u(t-2) and -2u(t-4) ; which are the rise and fall respectively. So I multiplied (t-4) by these two and it's not the same graph:
(t-4)*(2u(t-2)-2u(t-4)
The solutions give (t-4)*(u(t-2)-u(t-4) - which now gives the correct graph. However, I don't understand why since it rises to 2u and drops by 2u, how did the constant two disappear?
Also the equation here is simplified to 2u(t − 2) − r(t − 2) + r(t − 4) - which I do not understand as to where an r came from.
Similarly for part d, I calculate the gradient and intercept, which gives y = -x for the slope, which gives the function (-t), and this shold be multiplied through like (-t)(u(t-1) - 2u(t-2)) I would have thought, but once again in the solution that 2 has disappeared from 2u(t-2)
Can someone explain?
Why does the function become t - 4 if you just said it is -t +4? We can just evaluate your two equations and see they are wrong. Consider t = 2 where you should compute 2:
(2-4)(2u(2-2)-2u(2-4))=(2-4)(2u(0)-2u(-2))=(-2)(2-0) = -4
and the other
(2-4)(u(2-2)-u(2-4))=(2-4)(u(0)-u(-2))=(-2)(1-0) = -2
The answer should be
(-t+4)(u(t-2)-u(t-4))
the test:
(-2+4)(u(2-2)-u(2-4))=(2)(u(0)-u(-2))=(2)(1-0)=2
The reason the two isn't there is you find the linear line as if you had the entire function and no start or end. You did this, finding v = -t + 4. You then multiply it by a rectangle to make it nonzero only between 2 and 4. You do this by multiplying (u(t-2) - u(t-4)). the first unit step will trigger to 1 at t = 2 and stay there forever after. The second will become 1 at t = 4 and stay there forever after. So the quantity is 1 between 2 and 4. It then is 1 - 1 = 0 after 4 forever. And before t = 2, both were zero, so you had 0+0 = 0.
edit: and the simplification uses a function defined as
r(t) = tu(t)
So in the answer, everything is 0 before t = 2. The unit step itself and the two unit steps in the ramp functions both will be negative, making them equal zero. When you get to t = 2, the unit step returns a 1 and is then multiplied by two. So at that moment, you have v = 2. The first ramp also starts at that moment, but it equals zero still. It is (t - 2)u(t-2), so (2-2)u(2-2) = 0*1 = 0. The ramp then subtracts more and more as you go toward 4 (with slope -1). Just do the math to see it:
2u(t-2)-(t-2)u(t-2)= \left (2-t+2 \right) u(t-2) = \left (4 - t \right) u(t-2)
t = 2.5
\left (4 - 2.5 \right) u(2.5-2)=\left (1.5 \right) u(.5)=(1.5)(1) = 1.5
t = 3
\left (4 - 3 \right) u(3-2)=\left (1 \right) u(1)=(1)(1) = 1
until at t = 4, it equals zero.
But if you leave the above unchecked, it will just continue to become more negative linearly. So the second ramp function provides a positive increase at the same rate to counteract it, and it starts exactly at t = 4 where you need it. We have
2u(t-2) - (t-2)u(t-2) + (t-4)u(t-4)
But if we are analyzing when t >= 4, all of the unit steps are "1" and simply go away:
2 - (t-2)+ (t-4)=2-t+2+t-4=0