I have a system of differential equation for which I want analytical solution. Let say my equations are -
x'[t] - X[[i]]*y[t] == 0, y'[t] + X[[i]]*x[t] == 0 where X = [0.11, 0.21, 0.31, 0.41]
How can I write a for loop such that it takes X[[i]] from X and find the analytical solution and print/plot it?
I am trying following -
For[i = 1, i < 5, sols = DSolve[{x'[t] - X[[i]]*y[t] == 0, y'[t] + X[[i]]*x[t] == 0}, x[0] == 1, y[0] == 0, {x, y}, t] ]; Unfortunately, it isn't working.
