-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfcn_liederivative_m5.m
341 lines (336 loc) · 36.6 KB
/
fcn_liederivative_m5.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
function [h,Lfh,DLfh_Dx] = fcn_liederivative_m5(Y,alpha)
global theta_minus theta_plus;
deltheta=theta_plus - theta_minus;
h(1,1)=Y(2) - alpha(1,1)*((Y(1) + Y(2) + Y(4)/2 - theta_plus)/deltheta + 1)^5 + (alpha(1,6)*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^5)/deltheta^5 + (5*alpha(1,2)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^4*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta - (5*alpha(1,5)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^4)/deltheta^4 - (10*alpha(1,3)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2 + (10*alpha(1,4)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3)/deltheta^3;
h(2,1)=Y(3) - alpha(2,1)*((Y(1) + Y(2) + Y(4)/2 - theta_plus)/deltheta + 1)^5 + (alpha(2,6)*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^5)/deltheta^5 + (5*alpha(2,2)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^4*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta - (5*alpha(2,5)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^4)/deltheta^4 - (10*alpha(2,3)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2 + (10*alpha(2,4)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3)/deltheta^3;
h(3,1)=Y(4) - alpha(3,1)*((Y(1) + Y(2) + Y(4)/2 - theta_plus)/deltheta + 1)^5 + (alpha(3,6)*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^5)/deltheta^5 + (5*alpha(3,2)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^4*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta - (5*alpha(3,5)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^4)/deltheta^4 - (10*alpha(3,3)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2 + (10*alpha(3,4)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3)/deltheta^3;
h(4,1)=Y(5) - alpha(4,1)*((Y(1) + Y(2) + Y(4)/2 - theta_plus)/deltheta + 1)^5 + (alpha(4,6)*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^5)/deltheta^5 + (5*alpha(4,2)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^4*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta - (5*alpha(4,5)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^4)/deltheta^4 - (10*alpha(4,3)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2 + (10*alpha(4,4)*((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)/deltheta + 1)^2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3)/deltheta^3;
Lfh(1,1)=- Y(7)*((5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*...
alpha(1,5)))/deltheta^3 + ((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta - 1) - (Y(6)*(5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(1,1) - 25*...
alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((20*...
alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(1,1) - 90*...
alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(9)*(5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(1,1) - 25*...
alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((20*...
alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(1,1) - 90*...
alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2))/(2*deltheta);
Lfh(2,1)=Y(8) - (Y(6)*(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*...
alpha(2,5)))/deltheta^3 + ((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(7)*(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(2,1) - 25*...
alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((20*...
alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(2,1) - 90*...
alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(9)*(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(2,1) - 25*...
alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((20*...
alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(2,1) - 90*...
alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2))/(2*deltheta);
Lfh(3,1)=- Y(9)*((5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/deltheta^3 + ((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/(2*deltheta) - 1) - (Y(6)*(5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/deltheta^3 + ((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(7)*(5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(3,1) - 25*...
alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((20*...
alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(3,1) - 90*...
alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta;
Lfh(4,1)=Y(10) - (Y(6)*(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*...
alpha(4,5)))/deltheta^3 + ((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(7)*(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(4,1) - 25*...
alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((20*...
alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(4,1) - 90*...
alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2))/deltheta - (Y(9)*(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*alpha(4,1) - 25*...
alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((20*...
alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta + ((30*alpha(4,1) - 90*...
alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2))/(2*deltheta);
DLfh_Dx(1,1)=- (Y(6)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*...
alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*...
alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(1,1) - 40*alpha(1,2) + 20*...
alpha(1,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*...
alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*...
alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*...
alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*...
alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(1,2)=- (Y(6)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*...
alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*...
alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(1,1) - 40*alpha(1,2) + 20*...
alpha(1,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*...
alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*...
alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*...
alpha(1,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*...
alpha(1,4) + 20*alpha(1,5)))/deltheta^3 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(1,3)=0;
DLfh_Dx(1,4)=- (Y(6)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/(2*deltheta) + (2*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*...
alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*...
alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/(2*deltheta^3)))/deltheta - (Y(7)*((20*...
alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/(2*deltheta) + (2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*...
alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((30*...
alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*...
alpha(1,5)))/(2*deltheta^3)))/deltheta - (Y(9)*((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))/(2*deltheta) + (2*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*...
alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(1,1) - 80*...
alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*alpha(1,5)))/(2*deltheta^3)))/(2*deltheta);
DLfh_Dx(1,5)=0;
DLfh_Dx(1,6)=-(5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*...
alpha(1,5)))/deltheta^3 + ((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(1,7)=1 - (5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*...
alpha(1,5)))/deltheta^3 + ((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(1,8)=0;
DLfh_Dx(1,9)=-(5*alpha(1,1) - 5*alpha(1,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(1,1) - 25*alpha(1,2) + 50*alpha(1,3) - 50*alpha(1,4) + 25*alpha(1,5) - 5*alpha(1,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(1,1) - 80*alpha(1,2) + 120*alpha(1,3) - 80*alpha(1,4) + 20*...
alpha(1,5)))/deltheta^3 + ((20*alpha(1,1) - 40*alpha(1,2) + 20*alpha(1,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(1,1) - 90*alpha(1,2) + 90*alpha(1,3) - 30*alpha(1,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/(2*deltheta);
DLfh_Dx(1,10)=0;
DLfh_Dx(2,1)=- (Y(6)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*...
alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*...
alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(2,1) - 40*alpha(2,2) + 20*...
alpha(2,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*...
alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*...
alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*...
alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*...
alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(2,2)=- (Y(6)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*...
alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*...
alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(2,1) - 40*alpha(2,2) + 20*...
alpha(2,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*...
alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*...
alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*...
alpha(2,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*...
alpha(2,4) + 20*alpha(2,5)))/deltheta^3 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(2,3)=0;
DLfh_Dx(2,4)=- (Y(6)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/(2*deltheta) + (2*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*...
alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*...
alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/(2*deltheta^3)))/deltheta - (Y(7)*((20*...
alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/(2*deltheta) + (2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*...
alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((30*...
alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*...
alpha(2,5)))/(2*deltheta^3)))/deltheta - (Y(9)*((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))/(2*deltheta) + (2*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*...
alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(2,1) - 80*...
alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*alpha(2,5)))/(2*deltheta^3)))/(2*deltheta);
DLfh_Dx(2,5)=0;
DLfh_Dx(2,6)=-(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*...
alpha(2,5)))/deltheta^3 + ((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(2,7)=-(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*...
alpha(2,5)))/deltheta^3 + ((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(2,8)=1;
DLfh_Dx(2,9)=-(5*alpha(2,1) - 5*alpha(2,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(2,1) - 25*alpha(2,2) + 50*alpha(2,3) - 50*alpha(2,4) + 25*alpha(2,5) - 5*alpha(2,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(2,1) - 80*alpha(2,2) + 120*alpha(2,3) - 80*alpha(2,4) + 20*...
alpha(2,5)))/deltheta^3 + ((20*alpha(2,1) - 40*alpha(2,2) + 20*alpha(2,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(2,1) - 90*alpha(2,2) + 90*alpha(2,3) - 30*alpha(2,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/(2*deltheta);
DLfh_Dx(2,10)=0;
DLfh_Dx(3,1)=- (Y(6)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*...
alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*...
alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(3,1) - 40*alpha(3,2) + 20*...
alpha(3,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*...
alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*...
alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*...
alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*...
alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(3,2)=- (Y(6)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*...
alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*...
alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(3,1) - 40*alpha(3,2) + 20*...
alpha(3,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*...
alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*...
alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*...
alpha(3,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*...
alpha(3,4) + 20*alpha(3,5)))/deltheta^3 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(3,3)=0;
DLfh_Dx(3,4)=- (Y(6)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/(2*deltheta) + (2*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*...
alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*...
alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*alpha(3,5)))/(2*deltheta^3)))/deltheta - (Y(7)*((20*...
alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/(2*deltheta) + (2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((30*...
alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/(2*deltheta^3)))/deltheta - (Y(9)*((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))/(2*deltheta) + (2*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*...
alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(3,1) - 80*...
alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*alpha(3,5)))/(2*deltheta^3)))/(2*deltheta);
DLfh_Dx(3,5)=0;
DLfh_Dx(3,6)=-(5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/deltheta^3 + ((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(3,7)=-(5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/deltheta^3 + ((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(3,8)=0;
DLfh_Dx(3,9)=1 - (5*alpha(3,1) - 5*alpha(3,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(3,1) - 25*alpha(3,2) + 50*alpha(3,3) - 50*alpha(3,4) + 25*alpha(3,5) - 5*alpha(3,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(3,1) - 80*alpha(3,2) + 120*alpha(3,3) - 80*alpha(3,4) + 20*...
alpha(3,5)))/deltheta^3 + ((20*alpha(3,1) - 40*alpha(3,2) + 20*alpha(3,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(3,1) - 90*alpha(3,2) + 90*alpha(3,3) - 30*alpha(3,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/(2*deltheta);
DLfh_Dx(3,10)=0;
DLfh_Dx(4,1)=- (Y(6)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*...
alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*...
alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(4,1) - 40*alpha(4,2) + 20*...
alpha(4,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*...
alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*...
alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*...
alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*...
alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(4,2)=- (Y(6)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*...
alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*...
alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/deltheta - (Y(7)*((20*alpha(4,1) - 40*alpha(4,2) + 20*...
alpha(4,3))/deltheta + (4*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*...
alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*...
alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*...
alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*Y(1) + 2*Y(2) + Y(4) - 2*...
theta_plus))/deltheta^2))/deltheta - (Y(9)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/deltheta + (4*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*...
alpha(4,6)))/deltheta^4 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*...
alpha(4,4) + 20*alpha(4,5)))/deltheta^3 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(2*...
Y(1) + 2*Y(2) + Y(4) - 2*theta_plus))/deltheta^2))/(2*deltheta);
DLfh_Dx(4,3)=0;
DLfh_Dx(4,4)=- (Y(6)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/(2*deltheta) + (2*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*...
alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*...
alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/(2*deltheta^3)))/deltheta - (Y(7)*((20*...
alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/(2*deltheta) + (2*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*...
alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((30*...
alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*...
alpha(4,5)))/(2*deltheta^3)))/deltheta - (Y(9)*((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))/(2*deltheta) + (2*...
(Y(1) + Y(2) + Y(4)/2 - theta_plus)^3*(5*alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*...
alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) +...
Y(2) + Y(4)/2 - theta_plus))/deltheta^2 + (3*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2*(20*alpha(4,1) - 80*...
alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*alpha(4,5)))/(2*deltheta^3)))/(2*deltheta);
DLfh_Dx(4,5)=0;
DLfh_Dx(4,6)=-(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*...
alpha(4,5)))/deltheta^3 + ((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(4,7)=-(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*...
alpha(4,5)))/deltheta^3 + ((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) + Y(4)/2 - theta_plus)^2)/deltheta^2)/deltheta;
DLfh_Dx(4,8)=0;
DLfh_Dx(4,9)=-(5*alpha(4,1) - 5*alpha(4,2) + ((Y(1) + Y(2) + Y(4)/2 - theta_plus)^4*(5*...
alpha(4,1) - 25*alpha(4,2) + 50*alpha(4,3) - 50*alpha(4,4) + 25*alpha(4,5) - 5*alpha(4,6)))/deltheta^4 + ((Y(1) +...
Y(2) + Y(4)/2 - theta_plus)^3*(20*alpha(4,1) - 80*alpha(4,2) + 120*alpha(4,3) - 80*alpha(4,4) + 20*...
alpha(4,5)))/deltheta^3 + ((20*alpha(4,1) - 40*alpha(4,2) + 20*alpha(4,3))*(Y(1) + Y(2) + Y(4)/2 - theta_plus))/deltheta +...
((30*alpha(4,1) - 90*alpha(4,2) + 90*alpha(4,3) - 30*alpha(4,4))*(Y(1) + Y(2) +...
Y(4)/2 - theta_plus)^2)/deltheta^2)/(2*deltheta);
DLfh_Dx(4,10)=1;
end