SOlving Simultaneous Differential Equations
Show older comments
I want to solve the following simultaneous equations
y1''=(y2')^2*sin(y1)*cos(y1)
y2''=-2*y1'*y2'*cot(y1)
I have tried the following code but didn't work.
clc; clear all;
syms u(t) v(t)
Du = diff(u,t);
Dv = diff(v,t);
ode1 = diff(u,t,2) == diff(v,t,1)^2*sin(u)*cos(u);
ode2 = diff(v,t,2) == -2*diff(u,t,1)*diff(v,t,1)*cot(u);
odes = [ode1; ode2];
cond1 = u(0) == pi/12;
cond2 = Du(0) == 0;
cond3 = v(0) == 0;
cond4 = Dv(0) == 20;
conds = [cond1; cond2; cond3; cond4];
[uSol(t), vSol(t)] = dsolve(odes,conds)
Please suggest an alternative and simple technique to solve the problem.
Answers (1)
John D'Errico
on 9 May 2018
0 votes
help ode45
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!