- #1
dugironbeard
- 4
- 0
Homework Statement
dx(1)/dt=-0.1x(1)-x(2)
dx(2)/dt=x(1)-0.1x(2)
x1|t=0 = 1 , x2|t=0 =0
First we had to define the magnitude (q) of the velocity vector at t = 10.
The follow up question is:
The horizontal component x1|t=0 of the starting position is not known very accurately. However at t = 10 an accurate measurement of q=0.45 is known.
Determine the vvalue of x1|t=0 that leads to q=0.45
Homework Equations
The Attempt at a Solution
To find the initial q I made the following files in matlab.
clear,clc
x0=[1 0];
tspan=[0 1.01 10];
[t,x]=ode45('partb',tspan,x0);
x =
1.0000 0
0.4807 0.7656
-0.3083 -0.2002
function xp = partb(t,x)
t=10
x(1)=-0.3083
x(2)=-0.2002
xp(1)=(-0.1*x(1)-x(2));
xp(2)=(x(1)-0.1*x(2));
disp (xp(1))
disp (xp(2))
q=((xp(1)^2)+(xp(2)^2))^0.5
end
q = 0.3694
Now the problem is I don't know how to work backwards, I know I have to do something with fzero but I have to many variables. Any help would be greatly appreciated.