Hello, when I am trying to solve my equations using dsolve, I get an empty sym for my dsolve.

1 view (last 30 days)
The above is the equations I used to do my diferentiation wrt different states to get the hamiltonian equations for dsolve and attached is my code below. It is quite long and messy but all the variables are x1-x7, lam1-lam7 with the initial and final conditions as required for the dsolve.
epsilon = 0
clear all
S = dsolve(['Dx1 = x3 + (9476649*lam3*x2)/(81350000*lam2) + (8379*lam1)/(80*lam2*x5) + (g*cos(x1 - x4))/x2 - ((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5) + (8379*lam2*x2^2*((10*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(lam2*x2) + ((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))/(2*lam2*x2)))/(800*x5), '...
'Dx2 = (cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400) - (8379*x2^2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/800)/x5 + g*sin(x1 - x4) + (728973*lam3*x2^2*((5200*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2)))/162700000 + (8379*lam2*x2^2*(((100*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((2000*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/(800*x5) + (8379*lam1*x2*((2000*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2)))/(800*x5), '...
'Dx3 = (9476649*lam1*x2)/(81350000*lam2) - (728973*x2^2*((683*x1)/1000 + (21663*x3)/(2500*x2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - 1/20))/162700000 + (10718090019*lam3*x2^2*x5)/(82722781250000*lam2) + (8379*lam2*x2^2*((2262*x5*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(203375*lam2) + (1131*x5*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(2033750*lam2)))/(800*x5), '...
'Dx4 = x3, '...
'Dx5 = - (5*x2)/153117 - (x6*((100*x2)/17013 - 11))/6000000 - 7/90, '...
'Dx6 = -x2*sin(x1 - x4), '...
'Dx7 = x2*cos(x1 - x4), '...
'Dlam1 = lam1*((g*sin(x1 - x4))/x2 + (cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5)) - (11708035353*lam3*x2^2)/162700000000 - lam2*(g*cos(x1 - x4) - (sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/x5) + lam6*x2*cos(x1 - x4) + lam7*x2*sin(x1 - x4), '...
'Dlam2 = lam5*(x6/1020780000 + 5/153117) + lam1*((sin(epsilon + x1)*(x6/56710 + 10000/17013) - (8379*x2^2*((1653*x3)/(500*x2^2) - (3200000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (1600000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2)))/800 + (8379*x2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/400)/(x2*x5) + (g*cos(x1 - x4))/x2^2 - ((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2^2*x5)) - lam7*cos(x1 - x4) + lam6*sin(x1 - x4) - (728973*lam3*x2^2*((21663*x3)/(2500*x2^2) - (8320000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (4160000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2)))/162700000 + (728973*lam3*x2*((683*x1)/1000 + (21663*x3)/(2500*x2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - 1/20))/81350000 - (lam2*((8379*x2^2*(((1653*x3)/(10000*x2^2) - (160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (80000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((1653*x3)/(500*x2^2) - (3200000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (1600000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/800 + cos(epsilon + x1)*(x6/56710 + 10000/17013) - (8379*x2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/400))/x5, '...
'Dlam3 = (63420651*lam3*x2)/203375000000 - lam4 - lam1, '...
'Dlam4 = g*lam2*cos(x1 - x4) - lam6*x2*cos(x1 - x4) - lam7*x2*sin(x1 - x4) - (g*lam1*sin(x1 - x4))/x2, '...
'Dlam5 = lam2*((cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400) - (8379*x2^2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/800)/x5^2 - (8379*x2^2*(((80000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (80000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((1600000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (1600000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/(800*x5)) - lam1*(((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5^2) + (8379*x2*((1600000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (1600000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2)))/(800*x5)) - (728973*lam3*x2^2*((4160000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (4160000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2)))/162700000, '...
'Dlam6 = lam5*(x2/1020780000 - 11/6000000) - (lam2*cos(epsilon + x1)*(x2/56710 - 33/1000))/x5 + (lam1*sin(epsilon + x1)*(x2/56710 - 33/1000))/(x2*x5), '...
'Dlam7 = 0, '...
'x1(0) = 0.043891433584247, '...
'x2(0) = 63.291751932577750, '...
'x3(0) = 0 , '...
'x4(0) = 0.043891433584247, '...
'x5(0) = 1248.5, '...
'x6(0) = 0, '...
'x7(0) = 0, '...
'x1(tf) = 0.315320021418749,'...
'x2(tf) = 24.042387774762076,'...
'x3(tf) = 0,'...
'x4(tf) = 0.315320021418749,'...
'lam5(tf) = 0,'...
'x6(tf) = 88.638161212179780,'...
'lam7(tf) = 0'])
t = 'tf'

Answers (1)

Walter Roberson
Walter Roberson on 11 Feb 2022
Edited: Walter Roberson on 11 Feb 2022
MATLAB is never able to handle more than one boundary condition on the same function. In cases where it is possible to solve at all, you must specify at most one boundary condition for the functions, and then do a post-processing step to solve the boundaries.
MATLAB generates solutions by solving the highest level of derivative for a function and adding a constant; integrating that and adding a constant to the result; integrating that and adding a constant, and so on, so ending up with something of the form F(t) = f(t) + constant0 + constant1 * t + constant2 * t^2 + ... and the boundary conditions serve only to constrain the one constant that is added per level. There is no provision in the code to take multiple boundary conditions as hints to generate a periodic function that goes through all the points, or anything like that. It is all straight single-point-per-derivative constraints.
When you have so many variables, most of the time MATLAB will not be able to find a closed form solution. Sometimes software systems are able to find representable solutions, but only when no boundary conditions are given (the boundary conditions are too hard to solve, such as if they involve polynomials of degree 5 or higher.) So sometimes you need to solve without boundary conditions and then introduce some of the boundary conditions. But in the case of this system, MATLAB is not able to find a solution even for the basic equations without boundary conditions. There isn't much that can be done in such a case, at least not without a lot of hand effort.
syms x1(t) x2(t) x3(t) x4(t) x5(t) x6(t) x7(t)
syms lam1(t) lam2(t) lam3(t) lam4(t) lam5(t) lam6(t) lam7(t)
syms tf g epsilon
Dx1 = diff(x1); Dx2 = diff(x2); Dx3 = diff(x3); Dx4 = diff(x4); Dx5 = diff(x5); Dx6 = diff(x6); Dx7 = diff(x7);
Dlam1 = diff(lam1); Dlam2 = diff(lam2); Dlam3 = diff(lam3); Dlam4 = diff(lam4);
Dlam5 = diff(lam5); Dlam6 = diff(lam6); Dlam7 = diff(lam7);
eqns = [
Dx1 == x3 + (9476649*lam3*x2)/(81350000*lam2) + (8379*lam1)/(80*lam2*x5) + (g*cos(x1 - x4))/x2 - ((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5) + (8379*lam2*x2^2*((10*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(lam2*x2) + ((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))/(2*lam2*x2)))/(800*x5)
Dx2 == (cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400) - (8379*x2^2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/800)/x5 + g*sin(x1 - x4) + (728973*lam3*x2^2*((5200*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2)))/162700000 + (8379*lam2*x2^2*(((100*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((2000*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/(800*x5) + (8379*lam1*x2*((2000*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(71*lam2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2^2*x2^2)))/(800*x5)
Dx3 == (9476649*lam1*x2)/(81350000*lam2) - (728973*x2^2*((683*x1)/1000 + (21663*x3)/(2500*x2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - 1/20))/162700000 + (10718090019*lam3*x2^2*x5)/(82722781250000*lam2) + (8379*lam2*x2^2*((2262*x5*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(203375*lam2) + (1131*x5*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/(2033750*lam2)))/(800*x5)
Dx4 == x3
Dx5 == - (5*x2)/153117 - (x6*((100*x2)/17013 - 11))/6000000 - 7/90
Dx6 == -x2*sin(x1 - x4)
Dx7 == x2*cos(x1 - x4)
Dlam1 == lam1*((g*sin(x1 - x4))/x2 + (cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5)) - (11708035353*lam3*x2^2)/162700000000 - lam2*(g*cos(x1 - x4) - (sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/x5) + lam6*x2*cos(x1 - x4) + lam7*x2*sin(x1 - x4)
Dlam2 == lam5*(x6/1020780000 + 5/153117) + lam1*((sin(epsilon + x1)*(x6/56710 + 10000/17013) - (8379*x2^2*((1653*x3)/(500*x2^2) - (3200000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (1600000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2)))/800 + (8379*x2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/400)/(x2*x5) + (g*cos(x1 - x4))/x2^2 - ((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2^2*x5)) - lam7*cos(x1 - x4) + lam6*sin(x1 - x4) - (728973*lam3*x2^2*((21663*x3)/(2500*x2^2) - (8320000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (4160000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2)))/162700000 + (728973*lam3*x2*((683*x1)/1000 + (21663*x3)/(2500*x2) - (4160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - 1/20))/81350000 - (lam2*((8379*x2^2*(((1653*x3)/(10000*x2^2) - (160000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (80000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((1653*x3)/(500*x2^2) - (3200000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^3) + (1600000*x5*((672842079*lam3*x2)/81350000000 + (594909*lam1)/(160000*x5) - (983384577*lam2*x3)/(800000000*x5) + (8379*lam2*x2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(400*x5)))/(594909*lam2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/800 + cos(epsilon + x1)*(x6/56710 + 10000/17013) - (8379*x2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/400))/x5
Dlam3 == (63420651*lam3*x2)/203375000000 - lam4 - lam1
Dlam4 == g*lam2*cos(x1 - x4) - lam6*x2*cos(x1 - x4) - lam7*x2*sin(x1 - x4) - (g*lam1*sin(x1 - x4))/x2
Dlam5 == lam2*((cos(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400) - (8379*x2^2*(((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + 3/100))/800)/x5^2 - (8379*x2^2*(((80000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (80000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2))*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)) + ((1600000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (1600000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2))*((161*x1)/500 + (1653*x3)/(10000*x2) - (80000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2))))/(800*x5)) - lam1*(((8379*x2^2*((161*x1)/25 + (1653*x3)/(500*x2) - (1600000*x5*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2)))/800 + sin(epsilon + x1)*((10000*x2)/17013 + (3*x6*((100*x2)/17013 - 11))/1000 + 1400))/(x2*x5^2) + (8379*x2*((1600000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (1600000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2)))/(800*x5)) - (728973*lam3*x2^2*((4160000*((672842079*lam3*x2^2)/162700000000 + (594909*lam1*x2)/(160000*x5) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5)))/(594909*lam2*x2^2) - (4160000*x5*((594909*lam1*x2)/(160000*x5^2) + (8379*lam2*x2^2*((11431*x1)/50000 + (117363*x3)/(1000000*x2)))/(800*x5^2)))/(594909*lam2*x2^2)))/162700000
Dlam6 == lam5*(x2/1020780000 - 11/6000000) - (lam2*cos(epsilon + x1)*(x2/56710 - 33/1000))/x5 + (lam1*sin(epsilon + x1)*(x2/56710 - 33/1000))/(x2*x5)
Dlam7 == 0
]
eqns(t) = 
ics0 = [
x1(0) == sym('0.043891433584247')
x2(0) == sym('63.291751932577750')
x3(0) == sym(0)
x4(0) == sym('0.043891433584247')
x5(0) == sym('1248.5')
x6(0) == sym(0)
x7(0) == sym(0)
]
ics0 = 
icstf = [
x1(tf) == sym('0.315320021418749')
x2(tf) == sym('24.042387774762076')
x3(tf) == sym(0)
x4(tf) == sym('0.315320021418749')
lam5(tf) == sym(0)
x6(tf) == sym('88.638161212179780')
lam7(tf) == sym(0)
]
icstf = 
sol1 = dsolve(eqns)
Warning: Unable to find symbolic solution.
sol1 = [ empty sym ]
%sol2 = dsolve([eqns; ics0])
%sol3 = dsolve([eqns; ics0; icstf])
string(eqns)
ans = "[diff(x1(t), t) == x3(t) + (g*cos(x1(t) - x4(t)))/x2(t) + (9476649*lam3(t)*x2(t))/(81350000*lam2(t)) - (sin(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400) + (8379*x2(t)^2*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/800)/(x2(t)*x5(t)) + (8379*lam1(t))/(80*lam2(t)*x5(t)) + (8379*lam2(t)*x2(t)^2*(((161*x1(t))/50 + (1653*x3(t))/(1000*x2(t)) - (800000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))/(lam2(t)*x2(t)) + ((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))/(2*lam2(t)*x2(t))))/(800*x5(t));diff(x2(t), t) == (cos(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400) - (8379*x2(t)^2*(((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)) + 3/100))/800)/x5(t) + g*sin(x1(t) - x4(t)) + (728973*lam3(t)*x2(t)^2*(((148603*x1(t))/125 + (1525719*x3(t))/(2500*x2(t)))/(71*lam2(t)) - (4160000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)^2*x2(t)^2)))/162700000 + (8379*lam1(t)*x2(t)*(((11431*x1(t))/25 + (117363*x3(t))/(500*x2(t)))/(71*lam2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)^2*x2(t)^2)))/(800*x5(t)) + (8379*lam2(t)*x2(t)^2*((((11431*x1(t))/500 + (117363*x3(t))/(10000*x2(t)))/(71*lam2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)^2*x2(t)^2))*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)) + (((11431*x1(t))/25 + (117363*x3(t))/(500*x2(t)))/(71*lam2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)^2*x2(t)^2))*((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))))/(800*x5(t));diff(x3(t), t) == (9476649*lam1(t)*x2(t))/(81350000*lam2(t)) - (728973*x2(t)^2*((683*x1(t))/1000 + (21663*x3(t))/(2500*x2(t)) - (4160000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2) - 1/20))/162700000 + (8379*lam2(t)*x2(t)^2*((2262*x5(t)*((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/(203375*lam2(t)) + (1131*x5(t)*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/(2033750*lam2(t))))/(800*x5(t)) + (10718090019*lam3(t)*x2(t)^2*x5(t))/(82722781250000*lam2(t));diff(x4(t), t) == x3(t);diff(x5(t), t) == - (5*x2(t))/153117 - (x6(t)*((100*x2(t))/17013 - 11))/6000000 - 7/90;diff(x6(t), t) == -sin(x1(t) - x4(t))*x2(t);diff(x7(t), t) == x2(t)*cos(x1(t) - x4(t));diff(lam1(t), t) == lam1(t)*((g*sin(x1(t) - x4(t)))/x2(t) + (cos(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400))/(x2(t)*x5(t))) - (11708035353*lam3(t)*x2(t)^2)/162700000000 - lam2(t)*(g*cos(x1(t) - x4(t)) - (sin(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400))/x5(t)) + lam6(t)*x2(t)*cos(x1(t) - x4(t)) + sin(x1(t) - x4(t))*lam7(t)*x2(t);diff(lam2(t), t) == sin(x1(t) - x4(t))*lam6(t) - lam7(t)*cos(x1(t) - x4(t)) + lam5(t)*(x6(t)/1020780000 + 4818993076852225/147573952589676412928) + lam1(t)*((sin(epsilon + x1(t))*(x6(t)/56710 + 10000/17013) - (8379*x2(t)^2*((1653*x3(t))/(500*x2(t)^2) - (3200000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^3) + (1600000*x5(t)*((672842079*lam3(t)*x2(t))/81350000000 + (594909*lam1(t))/(160000*x5(t)) - (983384577*lam2(t)*x3(t))/(800000000*x5(t)) + (8379*lam2(t)*x2(t)*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(400*x5(t))))/(594909*lam2(t)*x2(t)^2)))/800 + (8379*x2(t)*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/400)/(x2(t)*x5(t)) + (g*cos(x1(t) - x4(t)))/x2(t)^2 - (sin(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400) + (8379*x2(t)^2*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/800)/(x2(t)^2*x5(t))) - (lam2(t)*(cos(epsilon + x1(t))*(x6(t)/56710 + 10000/17013) - (8379*x2(t)*(((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)) + 3/100))/400 + (8379*x2(t)^2*(((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))*((1653*x3(t))/(10000*x2(t)^2) - (160000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^3) + (80000*x5(t)*((672842079*lam3(t)*x2(t))/81350000000 + (594909*lam1(t))/(160000*x5(t)) - (983384577*lam2(t)*x3(t))/(800000000*x5(t)) + (8379*lam2(t)*x2(t)*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(400*x5(t))))/(594909*lam2(t)*x2(t)^2)) + ((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))*((1653*x3(t))/(500*x2(t)^2) - (3200000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^3) + (1600000*x5(t)*((672842079*lam3(t)*x2(t))/81350000000 + (594909*lam1(t))/(160000*x5(t)) - (983384577*lam2(t)*x3(t))/(800000000*x5(t)) + (8379*lam2(t)*x2(t)*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(400*x5(t))))/(594909*lam2(t)*x2(t)^2))))/800))/x5(t) - (728973*lam3(t)*x2(t)^2*((21663*x3(t))/(2500*x2(t)^2) - (8320000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^3) + (4160000*x5(t)*((672842079*lam3(t)*x2(t))/81350000000 + (594909*lam1(t))/(160000*x5(t)) - (983384577*lam2(t)*x3(t))/(800000000*x5(t)) + (8379*lam2(t)*x2(t)*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(400*x5(t))))/(594909*lam2(t)*x2(t)^2)))/162700000 + (728973*lam3(t)*x2(t)*((683*x1(t))/1000 + (21663*x3(t))/(2500*x2(t)) - (4160000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2) - 1/20))/81350000;diff(lam3(t), t) == (63420651*lam3(t)*x2(t))/203375000000 - lam4(t) - lam1(t);diff(lam4(t), t) == g*lam2(t)*cos(x1(t) - x4(t)) - sin(x1(t) - x4(t))*lam7(t)*x2(t) - lam6(t)*x2(t)*cos(x1(t) - x4(t)) - (g*sin(x1(t) - x4(t))*lam1(t))/x2(t);diff(lam5(t), t) == lam2(t)*((cos(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400) - (8379*x2(t)^2*(((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)) + 3/100))/800)/x5(t)^2 - (8379*x2(t)^2*((((672842079*lam3(t)*x2(t)^2)/2033750 + (594909*lam1(t)*x2(t))/(2*x5(t)) + (837900*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/x5(t))/(594909*lam2(t)*x2(t)^2) - (80000*x5(t)*((594909*lam1(t)*x2(t))/(160000*x5(t)^2) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t)^2)))/(594909*lam2(t)*x2(t)^2))*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)) + (((1345684158*lam3(t)*x2(t)^2)/203375 + (5949090*lam1(t)*x2(t))/x5(t) + (16758000*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/x5(t))/(594909*lam2(t)*x2(t)^2) - (1600000*x5(t)*((594909*lam1(t)*x2(t))/(160000*x5(t)^2) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t)^2)))/(594909*lam2(t)*x2(t)^2))*((161*x1(t))/500 + (1653*x3(t))/(10000*x2(t)) - (80000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2))))/(800*x5(t))) - lam1(t)*((8379*x2(t)*(((1345684158*lam3(t)*x2(t)^2)/203375 + (5949090*lam1(t)*x2(t))/x5(t) + (16758000*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/x5(t))/(594909*lam2(t)*x2(t)^2) - (1600000*x5(t)*((594909*lam1(t)*x2(t))/(160000*x5(t)^2) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t)^2)))/(594909*lam2(t)*x2(t)^2)))/(800*x5(t)) + (sin(epsilon + x1(t))*((10000*x2(t))/17013 + (3*x6(t)*((100*x2(t))/17013 - 11))/1000 + 1400) + (8379*x2(t)^2*((161*x1(t))/25 + (1653*x3(t))/(500*x2(t)) - (1600000*x5(t)*((672842079*lam3(t)*x2(t)^2)/162700000000 + (594909*lam1(t)*x2(t))/(160000*x5(t)) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t))))/(594909*lam2(t)*x2(t)^2)))/800)/(x2(t)*x5(t)^2)) - (728973*lam3(t)*x2(t)^2*(((17493894054*lam3(t)*x2(t)^2)/1016875 + (15467634*lam1(t)*x2(t))/x5(t) + (43570800*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/x5(t))/(594909*lam2(t)*x2(t)^2) - (4160000*x5(t)*((594909*lam1(t)*x2(t))/(160000*x5(t)^2) + (8379*lam2(t)*x2(t)^2*((11431*x1(t))/50000 + (117363*x3(t))/(1000000*x2(t))))/(800*x5(t)^2)))/(594909*lam2(t)*x2(t)^2)))/162700000;diff(lam6(t), t) == lam5(t)*(x2(t)/1020780000 - 1082208985657627/590295810358705651712) - (cos(epsilon + x1(t))*lam2(t)*(x2(t)/56710 - 33/1000))/x5(t) + (sin(epsilon + x1(t))*lam1(t)*(x2(t)/56710 - 33/1000))/(x2(t)*x5(t));diff(lam7(t), t) == 0]"
string(ics0)
ans = 7×1 string array
"x1(0) == 0.043891433584247" "x2(0) == 63.29175193257775" "x3(0) == 0" "x4(0) == 0.043891433584247" "x5(0) == 1248.5" "x6(0) == 0" "x7(0) == 0"
string(icstf)
ans = 7×1 string array
"x1(tf) == 0.315320021418749" "x2(tf) == 24.042387774762076" "x3(tf) == 0" "x4(tf) == 0.315320021418749" "lam5(tf) == 0" "x6(tf) == 88.63816121217978" "lam7(tf) == 0"
  5 Comments
Rachel Ong
Rachel Ong on 12 Feb 2022
I am requesting for the full text and I'll wait for it. How should I possibly get the formulas with these set of equations?
Walter Roberson
Walter Roberson on 12 Feb 2022
Sorry, I have not studied optimal control at all.
Those look like they might rocket equations? If so then searching on the topic of optimal control rocket could potentially help.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!