My code below plots the solution of the equation of Mathieu with the initial condition: y(0) = 1, y'(0) = 1
Now I still want the same solution to this problem, but with new boundary conditions: y(1) = -1, y(10) = 1
I tried solving it with dsolve(eq, y(1) == -1, y(10) == 1) but then I couldn't implement it into my function.
syms t y(t)syms a qtm = [0 75]; %time intervall
figure(1)clfhold ony0=[-1;1]; %initial conditions
[t,y1] = ode23(@Mathieu, tm, y0);plot(t,y1(:,2))%y(t)
xlim([0 75])function dydt = Mathieu(t,y)a = 2;q = 0.5;dydt = [y(2); -(a-2*q*cos(2*t))*y(1)];end
Best Answer