-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.nb
16966 lines (16756 loc) · 786 KB
/
dev.nb
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 13.2' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 787450, 16958]
NotebookOptionsPosition[ 773324, 16710]
NotebookOutlinePosition[ 773753, 16727]
CellTagsIndexPosition[ 773710, 16724]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell["\:5b9e\:7528\:51fd\:6570", "Section",
CellChangeTimes->{{3.944895553556322*^9, 3.944895600363716*^9}, {
3.944896748403494*^9,
3.944896754378689*^9}},ExpressionUUID->"d6008720-894f-d64f-9678-\
80743e9b000b"],
Cell[CellGroupData[{
Cell["TimingTest \:6027\:80fd\:6d4b\:8bd5", "Subsection",
CellChangeTimes->{{3.89757954595344*^9, 3.897579549115928*^9}, {
3.8984495412998533`*^9, 3.898449541536955*^9}, 3.898449654484482*^9, {
3.898449714178988*^9, 3.898449715221871*^9}, {3.898588344295373*^9,
3.898588360243471*^9}, 3.8985894674462223`*^9, {3.914536593510252*^9,
3.9145365941565075`*^9}, {3.932199074783329*^9,
3.932199078021641*^9}},ExpressionUUID->"f90ff4e4-6a7f-4659-9fce-\
70d84e065d4d"],
Cell["\<\
TimingTest[code] \:8fd4\:56de\:6267\:884c code \:6240\:82b1\:8d39\:7684\:65f6\
\:95f4\:548c\:7ed3\:679c.
TimingTest[code,n] \:8fd4\:56de\:6267\:884c code n \:6b21\:6240\:82b1\:8d39\
\:7684\:65f6\:95f4\:548c\:7ed3\:679c.\
\>", "Text",
CellChangeTimes->{{3.8984412729881945`*^9, 3.898441281246538*^9}, {
3.898449268909623*^9, 3.898449299097341*^9}, {3.898449540716755*^9,
3.898449547897998*^9}, {3.898449721494199*^9, 3.89844972433473*^9}, {
3.898610153759347*^9, 3.898610155946762*^9}, {3.898610468629278*^9,
3.898610504117638*^9}, {3.9321993820993214`*^9, 3.9321993883546124`*^9}, {
3.942364404035696*^9,
3.9423644179248257`*^9}},ExpressionUUID->"f6914097-813b-4fd1-90d6-\
5b7090d2b75c"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "TimingTest", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "TimingTest", "]"}], "=",
RowBox[{"{", "HoldAll", "}"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"TimingTest", "[",
RowBox[{"code_", ",",
RowBox[{"n_Integer", ":", "1"}]}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{", "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"ClearSystemCache", "[", "]"}], ";", "\[IndentingNewLine]",
RowBox[{"AbsoluteTiming", "[",
RowBox[{
RowBox[{"Do", "[",
RowBox[{"code", ",",
RowBox[{"n", "-", "1"}]}], "]"}], ";", "code"}], "]"}]}]}],
"\[IndentingNewLine]", "]"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"Limit", "[",
RowBox[{
FractionBox[
RowBox[{
SuperscriptBox["x", "2"], "+", "1"}],
RowBox[{
RowBox[{"2",
SuperscriptBox["x", "2"]}], "-", "1"}]], ",",
RowBox[{"x", "->", "\[Infinity]"}]}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.897579228216336*^9, 3.897579542390922*^9}, {
3.8980636618428364`*^9, 3.898063662930768*^9}, 3.898156382097151*^9,
3.898446040932248*^9, {3.89844678018392*^9, 3.898446830168037*^9}, {
3.898588348833262*^9, 3.898588367248149*^9}, {3.898588422302991*^9,
3.898588470479357*^9}, {3.898589397459434*^9, 3.898589466370685*^9}, {
3.898602924766616*^9, 3.898602931778031*^9}, {3.898606479845177*^9,
3.8986065379025097`*^9}, {3.914536597246277*^9, 3.914536601909212*^9}, {
3.9145371791364536`*^9, 3.914537190886034*^9}, {3.91453789588152*^9,
3.914537897770012*^9}, {3.9321797946936035`*^9, 3.932179796489073*^9}, {
3.932180636854418*^9, 3.9321806667694206`*^9}, 3.9322000993849964`*^9, {
3.94236440404068*^9, 3.9423644108744564`*^9}},
CellLabel->
"In[197]:=",ExpressionUUID->"48c8affd-6e2b-425d-a938-be1169af55d0"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0225952`", ",",
FractionBox["1", "2"]}], "}"}]], "Output",
CellChangeTimes->{{3.89858942126936*^9, 3.898589430441421*^9},
3.898589469902136*^9, 3.898598264269569*^9, {3.89860292544247*^9,
3.898602932740289*^9}, {3.898606496165317*^9, 3.898606515067354*^9}, {
3.898606566495345*^9, 3.898606568059271*^9}, 3.8986111403687744`*^9,
3.9141258060526257`*^9, 3.914536603844105*^9, 3.914537194889742*^9,
3.9145378981830196`*^9, 3.9321796592570534`*^9, 3.9321798002122498`*^9,
3.932180678316551*^9, 3.9321807133078365`*^9, 3.932199165982519*^9,
3.932200100059372*^9, {3.942364427112463*^9, 3.9423644285455914`*^9},
3.943838736145727*^9},
CellLabel->
"Out[200]=",ExpressionUUID->"411e25b9-9eff-c046-8e35-143071899de7"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell["PassOptions \:4f20\:9012\:9009\:9879", "Subsection",
CellChangeTimes->{{3.9321877762717915`*^9, 3.932187778357588*^9}, {
3.932187815503685*^9,
3.932187823394785*^9}},ExpressionUUID->"63549ada-cc3f-a448-9b7d-\
0be5fd27a69e"],
Cell["PassOptions[from,to,opts] \:5728 from \:548c to \:95f4\:4f20\:9012 \
opts.", "Text",
CellChangeTimes->{{3.93219917960977*^9, 3.93219929477083*^9},
3.93219939549543*^9},ExpressionUUID->"2315d219-41ea-014d-8732-\
89df22979150"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "PassOptions", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"PassOptions", "[",
RowBox[{"from_", ",", "to_", ",",
RowBox[{"opts", ":",
RowBox[{"OptionsPattern", "[", "]"}]}]}], "]"}], ":=",
RowBox[{"Sequence", "@@",
RowBox[{"FilterRules", "[",
RowBox[{
RowBox[{
RowBox[{"GatherBy", "[",
RowBox[{
RowBox[{"{",
RowBox[{"opts", ",",
RowBox[{"Sequence", "@@",
RowBox[{"Options", "@", "from"}]}]}], "}"}], ",", "First"}],
"]"}], "[",
RowBox[{"[",
RowBox[{"All", ",", "1"}], "]"}], "]"}], ",",
RowBox[{"Options", "@", "to"}]}], "]"}]}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"PassOptions", "[",
RowBox[{"Plot", ",", "Plot3D", ",",
RowBox[{"AspectRatio", "->", "Automatic"}]}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.932187826372551*^9, 3.9321880316531925`*^9}, {
3.9321881039601765`*^9, 3.9321881043869476`*^9}, {3.932188160456745*^9,
3.9321881859455223`*^9}, {3.9321882342012386`*^9, 3.9321882662034683`*^9}, {
3.932188310892042*^9, 3.932188360282278*^9}, {3.9321989074791737`*^9,
3.9321989133754272`*^9}, {3.9321989690157413`*^9, 3.9321990157908516`*^9}, {
3.942364404051697*^9, 3.942364410876444*^9}},
CellLabel->
"In[205]:=",ExpressionUUID->"19bf4f12-9b48-b043-9655-28bf3b3d1f99"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0244559`", ",",
RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",",
RowBox[{"AlignmentPoint", "\[Rule]", "Center"}], ",",
RowBox[{"Axes", "\[Rule]", "True"}], ",",
RowBox[{"AxesLabel", "\[Rule]", "None"}], ",",
RowBox[{"AxesOrigin", "\[Rule]", "Automatic"}], ",",
RowBox[{"AxesStyle", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"Background", "\[Rule]", "None"}], ",",
RowBox[{"BaselinePosition", "\[Rule]", "Automatic"}], ",",
RowBox[{"BaseStyle", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"ClippingStyle", "\[Rule]", "None"}], ",",
RowBox[{"ColorFunction", "\[Rule]", "Automatic"}], ",",
RowBox[{"ColorFunctionScaling", "\[Rule]", "True"}], ",",
RowBox[{"ColorOutput", "\[Rule]", "Automatic"}], ",",
RowBox[{"ContentSelectable", "\[Rule]", "Automatic"}], ",",
RowBox[{"CoordinatesToolOptions", "\[Rule]", "Automatic"}], ",",
RowBox[{"DisplayFunction", "\[RuleDelayed]", "$DisplayFunction"}], ",",
RowBox[{"Epilog", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"Evaluated", "\[Rule]", "Automatic"}], ",",
RowBox[{"EvaluationMonitor", "\[Rule]", "None"}], ",",
RowBox[{"Exclusions", "\[Rule]", "Automatic"}], ",",
RowBox[{"ExclusionsStyle", "\[Rule]", "None"}], ",",
RowBox[{"Filling", "\[Rule]", "None"}], ",",
RowBox[{"FillingStyle", "\[Rule]", "Automatic"}], ",",
RowBox[{"FormatType", "\[RuleDelayed]", "TraditionalForm"}], ",",
RowBox[{"ImageMargins", "\[Rule]", "0.`"}], ",",
RowBox[{"ImagePadding", "\[Rule]", "All"}], ",",
RowBox[{"ImageSize", "\[Rule]", "Automatic"}], ",",
RowBox[{"ImageSizeRaw", "\[Rule]", "Automatic"}], ",",
RowBox[{"LabelingSize", "\[Rule]", "Automatic"}], ",",
RowBox[{"LabelStyle", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"MaxRecursion", "\[Rule]", "Automatic"}], ",",
RowBox[{"Mesh", "\[Rule]", "None"}], ",",
RowBox[{"MeshFunctions", "\[Rule]",
RowBox[{"{",
RowBox[{"#1", "&"}], "}"}]}], ",",
RowBox[{"MeshShading", "\[Rule]", "None"}], ",",
RowBox[{"MeshStyle", "\[Rule]", "Automatic"}], ",",
RowBox[{"Method", "\[Rule]", "Automatic"}], ",",
RowBox[{"PerformanceGoal", "\[RuleDelayed]", "$PerformanceGoal"}], ",",
RowBox[{"PlotLabel", "\[Rule]", "None"}], ",",
RowBox[{"PlotLabels", "\[Rule]", "None"}], ",",
RowBox[{"PlotLegends", "\[Rule]", "None"}], ",",
RowBox[{"PlotPoints", "\[Rule]", "Automatic"}], ",",
RowBox[{"PlotRange", "\[Rule]",
RowBox[{"{",
RowBox[{"Full", ",", "Automatic"}], "}"}]}], ",",
RowBox[{"PlotRangePadding", "\[Rule]", "Automatic"}], ",",
RowBox[{"PlotRegion", "\[Rule]", "Automatic"}], ",",
RowBox[{"PlotStyle", "\[Rule]", "Automatic"}], ",",
RowBox[{"PlotTheme", "\[RuleDelayed]", "$PlotTheme"}], ",",
RowBox[{"PreserveImageOptions", "\[Rule]", "Automatic"}], ",",
RowBox[{"Prolog", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"RegionFunction", "\[Rule]",
RowBox[{"(",
RowBox[{"True", "&"}], ")"}]}], ",",
RowBox[{"ScalingFunctions", "\[Rule]", "None"}], ",",
RowBox[{"TargetUnits", "\[Rule]", "Automatic"}], ",",
RowBox[{"Ticks", "\[Rule]", "Automatic"}], ",",
RowBox[{"TicksStyle", "\[Rule]",
RowBox[{"{", "}"}]}], ",",
RowBox[{"WorkingPrecision", "\[Rule]", "MachinePrecision"}]}],
"}"}]], "Output",
CellChangeTimes->{{3.9321879100383854`*^9, 3.9321879273342667`*^9}, {
3.93218797989937*^9, 3.9321879892813015`*^9}, {3.9321880215365353`*^9,
3.9321880407513027`*^9}, 3.9321881225333576`*^9, {3.932188252573557*^9,
3.9321882675253754`*^9}, {3.9321883443993893`*^9, 3.932188360836588*^9},
3.932198914812832*^9, {3.9321989829937916`*^9, 3.9321990201439953`*^9},
3.9321991702335625`*^9, {3.9423644311938457`*^9, 3.94236443240238*^9},
3.943838740743717*^9},
CellLabel->
"Out[207]=",ExpressionUUID->"fd31265d-2f3f-bd4b-9687-6da7583e06ee"]
}, Open ]]
}, Closed]]
}, Open ]],
Cell[CellGroupData[{
Cell["\:8868\:8fbe\:5f0f", "Section",
CellChangeTimes->{{3.9448967602955112`*^9,
3.944896772255619*^9}},ExpressionUUID->"34fa9187-3152-7242-b671-\
1f16f2d993f6"],
Cell[CellGroupData[{
Cell["AlgebraicExpressionQ \:4ee3\:6570\:8868\:8fbe\:5f0f\:5224\:5b9a", \
"Subsection",
CellChangeTimes->{{3.943838771435545*^9,
3.9438387869601707`*^9}},ExpressionUUID->"ea4ae2f8-987d-2445-8739-\
2110678b27e6"],
Cell["AlgebraicExpressionQ[expr,x] \:8fd4\:56de expr \:662f\:5426\:4e3a\:4ee3\
\:6570\:8868\:8fbe\:5f0f", "Text",
CellChangeTimes->{{3.943838796476528*^9,
3.943838814429579*^9}},ExpressionUUID->"717db9db-e144-4b45-9f8b-\
5bd1008e7c6d"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "AlgebraicExpressionQ", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "AlgebraicExpressionQ", "]"}], "=",
RowBox[{"{", "Listable", "}"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"AlgebraicExpressionQ", "[",
RowBox[{"expr_", ",", "x_Symbol"}], "]"}], ":=",
RowBox[{"Catch", "[", "\[IndentingNewLine]",
RowBox[{"RationalExpressionQ", "[",
RowBox[{
RowBox[{
RowBox[{"expr", "/.",
RowBox[{
SqrtBox["a_"], ":>", "a"}]}], "/.",
RowBox[{
SuperscriptBox["a_", "b_"], ":>",
RowBox[{"(",
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{"!",
RowBox[{"FreeQ", "[",
RowBox[{"b", ",", "x"}], "]"}]}], ",",
RowBox[{"Throw", "[", "False", "]"}]}], "]"}], ";", "a"}],
")"}]}]}], ",", "x"}], "]"}], "\[IndentingNewLine]", "]"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"AlgebraicExpressionQ", "[",
RowBox[{
RowBox[{"{",
RowBox[{"x", ",",
FractionBox["1",
SuperscriptBox["E", "x"]], ",",
FractionBox[
RowBox[{
RadicalBox[
RowBox[{"1", "+",
SuperscriptBox["x", "3"]}], "a"], "+", "1"}],
RadicalBox[
RowBox[{"1", "+",
SqrtBox[
RowBox[{"1", "+",
SuperscriptBox["x", "3"]}]]}],
FractionBox["1", "b"]]], ",",
FractionBox[
RowBox[{
RadicalBox[
RowBox[{"1", "+",
SuperscriptBox["x", "3"]}], "a"], "+", "1"}],
RadicalBox[
RowBox[{"1", "+",
SqrtBox[
RowBox[{"1", "+",
SuperscriptBox["x", "3"]}]]}],
FractionBox["1", "x"]]]}], "}"}], ",", "x"}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.9438387535918236`*^9, 3.9438387935989685`*^9}, {
3.943838827719124*^9, 3.9438388310889606`*^9}, {3.9438389082837257`*^9,
3.9438389138515625`*^9}, {3.9438389609751625`*^9, 3.943839066476063*^9}, {
3.943839101444025*^9, 3.943839157997032*^9}, {3.943839203772999*^9,
3.9438392516571503`*^9}, {3.9438392984360847`*^9, 3.943839515148533*^9}, {
3.943840697249111*^9, 3.943840837063856*^9}, {3.9438408702927494`*^9,
3.943840927206766*^9}, {3.943841002288948*^9, 3.943841007752527*^9}, {
3.9438411589957924`*^9, 3.9438412059561768`*^9}, {3.9438412914518147`*^9,
3.943841488575884*^9}},
CellLabel->
"In[424]:=",ExpressionUUID->"497df628-7dd8-3f42-97d6-f9fafe492b99"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0001319`", ",",
RowBox[{"{",
RowBox[{"True", ",", "False", ",", "True", ",", "False"}], "}"}]}],
"}"}]], "Output",
CellChangeTimes->{{3.9438391488105927`*^9, 3.943839158335827*^9},
3.943839251974972*^9, 3.9438393105146313`*^9, {3.943839363641674*^9,
3.9438394036319637`*^9}, {3.94383949128615*^9, 3.943839515376913*^9}, {
3.943840795591652*^9, 3.943840837548828*^9}, {3.943840882954468*^9,
3.9438409274299507`*^9}, {3.9438410026401405`*^9, 3.943841008231539*^9}, {
3.943841184085758*^9, 3.9438411869569607`*^9}, 3.943841291751795*^9, {
3.943841329291054*^9, 3.943841488843483*^9}},
CellLabel->
"Out[427]=",ExpressionUUID->"ebd0ccba-30ad-f34f-89ba-8237adeaaa3e"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell["ExpressionPivot \:8868\:8fbe\:5f0f\:4e3b\:5143", "Subsection",
CellChangeTimes->{
3.881261571343264*^9, {3.898449535119043*^9, 3.8984495362985797`*^9}, {
3.8984497483950005`*^9,
3.89844974898872*^9}},ExpressionUUID->"784fc19c-62f8-4bad-881c-\
fca2328794d0"],
Cell["ExpressionPivot[expr] \:8fd4\:56de expr \:4e2d\:9996\:4e2a\:975e\:6570\
\:503c\:7b26\:53f7.", "Text",
CellChangeTimes->{{3.898442710593676*^9, 3.898442743415276*^9}, {
3.8984464573563857`*^9, 3.8984464700812416`*^9}, 3.898449308555183*^9,
3.898449534028435*^9, {3.8984495884143*^9, 3.898449593441187*^9}, {
3.898456022092538*^9, 3.8984560381110597`*^9}, {3.898610492237751*^9,
3.898610501641953*^9},
3.932199409986719*^9},ExpressionUUID->"fda77400-73f5-49db-93ff-\
eb185d67aebf"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "ExpressionPivot", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "ExpressionPivot", "]"}], "=",
RowBox[{"{", "Listable", "}"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ExpressionPivotSymbolList", "=",
RowBox[{"{",
RowBox[{
RowBox[{"Symbol", "[", "\"\<x\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<y\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<z\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<u\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<v\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<w\>\"", "]"}], ",",
RowBox[{"Symbol", "[", "\"\<t\>\"", "]"}]}], "}"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"ExpressionPivot", "[", "expr_", "]"}], ":=",
RowBox[{"Catch", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"Do", "[",
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{"!",
RowBox[{"FreeQ", "[",
RowBox[{"expr", ",", "i"}], "]"}]}], ",",
RowBox[{"Throw", "[", "i", "]"}]}], "]"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "ExpressionPivotSymbolList"}], "}"}]}], "]"}], ";",
"\[IndentingNewLine]",
RowBox[{"FirstCase", "[",
RowBox[{"expr", ",",
RowBox[{"_Symbol", "?",
RowBox[{"(",
RowBox[{
RowBox[{"!",
RowBox[{"NumericQ", "@", "#"}]}], "&"}], ")"}]}], ",", "Symbol",
",",
RowBox[{"{",
RowBox[{"-", "1"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}],
";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ExpressionPivot", "[",
RowBox[{"{",
RowBox[{"1", ",", "a", ",", "x", ",",
FractionBox["a",
RowBox[{"a", "+", "x"}]], ",",
SuperscriptBox["E", "x"], ",",
RowBox[{"Sin", "[", "\[Theta]", "]"}]}], "}"}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.8812615801230173`*^9, 3.88126167633887*^9}, {
3.881261766362163*^9, 3.881261823838699*^9}, {3.8812620068443146`*^9,
3.8812620165175595`*^9}, {3.8812620479419546`*^9,
3.8812620815899687`*^9}, {3.881262194686629*^9, 3.881262209021083*^9}, {
3.881262315054818*^9, 3.881262438736573*^9}, {3.881262498457862*^9,
3.8812625557944126`*^9}, {3.8812626485340843`*^9, 3.881262768546598*^9}, {
3.881262890945066*^9, 3.881262931450222*^9}, {3.881262961971888*^9,
3.8812631580806475`*^9}, {3.8812632173477902`*^9, 3.881263309160058*^9}, {
3.8822005740689077`*^9, 3.882200605935709*^9}, {3.8822006542479105`*^9,
3.882200690746396*^9}, 3.882200810992259*^9, {3.889057643315501*^9,
3.889057653171678*^9}, {3.8890577545740843`*^9, 3.889057757051575*^9}, {
3.88905778775984*^9, 3.8890578377002153`*^9}, 3.889057934251857*^9, {
3.889057973843111*^9, 3.889057992623109*^9}, {3.889058041097636*^9,
3.889058125047696*^9}, {3.8890581726753273`*^9, 3.889058185687188*^9}, {
3.8890711078797207`*^9, 3.8890711545777483`*^9}, {3.889071782661847*^9,
3.889071796142689*^9}, {3.889071867712634*^9, 3.889071889542471*^9}, {
3.897557084853467*^9, 3.897557084967126*^9}, {3.897557787798626*^9,
3.8975578029507036`*^9}, {3.897558036835379*^9, 3.897558102170465*^9}, {
3.897558199566718*^9, 3.897558201965173*^9}, 3.897558653653065*^9,
3.897569581713081*^9, {3.897575962882409*^9, 3.8975759643574305`*^9}, {
3.8975762236015244`*^9, 3.897576227151003*^9}, {3.8975776911757145`*^9,
3.897577794314226*^9}, {3.897578833119809*^9, 3.897578837560462*^9}, {
3.897578872924392*^9, 3.897578877316488*^9}, {3.897579164523292*^9,
3.897579166013506*^9}, {3.897579589529781*^9, 3.897579613384663*^9},
3.8975796444062634`*^9, {3.897580555924001*^9, 3.897580589296524*^9}, {
3.8984355690921297`*^9, 3.898435755255912*^9}, {3.898435806128548*^9,
3.89843585366317*^9}, {3.8984363368337*^9, 3.898436370067327*^9},
3.898606542251979*^9, {3.8986091170233307`*^9, 3.8986091329057426`*^9}, {
3.914536637801153*^9, 3.9145366383317833`*^9}, {3.9145379001820183`*^9,
3.9145379093019657`*^9}, {3.932179740839157*^9, 3.932179820550392*^9}, {
3.932180043629032*^9, 3.9321802151917324`*^9}, {3.9321804338949394`*^9,
3.93218046972838*^9}, 3.932180500832758*^9, 3.932180597000017*^9, {
3.932180932612032*^9, 3.932180990010416*^9}, {3.93220239467745*^9,
3.9322024024863434`*^9}, {3.9322027529848633`*^9, 3.932202823957287*^9}, {
3.9382332008487835`*^9, 3.9382332168221855`*^9}, {3.942364404054693*^9,
3.9423644108774414`*^9}, {3.943839531722042*^9, 3.943839537164139*^9}, {
3.943840511802559*^9, 3.9438405396171513`*^9}, {3.9438410276699677`*^9,
3.9438410982425213`*^9}, {3.9438422165507145`*^9,
3.9438422167938824`*^9}, {3.9438422488757*^9, 3.943842248950945*^9}, {
3.9438425500708027`*^9, 3.943842631644781*^9}, {3.943842676560398*^9,
3.943842684645542*^9}, {3.9450732501926727`*^9, 3.945073275893448*^9}, {
3.945073317701748*^9, 3.9450734499807644`*^9}},
CellLabel->
"In[148]:=",ExpressionUUID->"2cf80ff6-bf72-4d35-b1f5-f03543c34b66"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.000077`", ",",
RowBox[{"{",
RowBox[{
"Symbol", ",", "a", ",", "x", ",", "x", ",", "x", ",", "\[Theta]"}],
"}"}]}], "}"}]], "Output",
CellChangeTimes->{{3.881263029681779*^9, 3.881263158365161*^9}, {
3.8812632194657574`*^9, 3.881263309717168*^9}, 3.881263392397648*^9,
3.881265552205414*^9, {3.882200583154648*^9, 3.882200609133211*^9},
3.882200656635619*^9, 3.88220069118622*^9, 3.8822008113864794`*^9, {
3.8890576393829947`*^9, 3.889057653492149*^9}, 3.889057757394754*^9,
3.889057838372447*^9, 3.889057935132286*^9, {3.8890579797600126`*^9,
3.889057993077814*^9}, {3.889058076797559*^9, 3.8890581384728*^9}, {
3.88905817566448*^9, 3.8890581861029434`*^9}, 3.889059198965727*^9,
3.889071163508389*^9, 3.8890717966608677`*^9, {3.889071877745415*^9,
3.8890718899799433`*^9}, 3.897556925879445*^9, {3.897558040982929*^9,
3.8975581024305673`*^9}, 3.897558204088344*^9, 3.897558236597767*^9,
3.897558654249855*^9, {3.897577762817846*^9, 3.897577785152034*^9},
3.897578846776416*^9, 3.897578878221454*^9, 3.897579186728601*^9, {
3.897579595429154*^9, 3.8975796448269672`*^9}, {3.8975805830664005`*^9,
3.897580589935274*^9}, {3.8975809589015517`*^9, 3.897580962460622*^9}, {
3.8975826828783083`*^9, 3.8975826899554443`*^9}, 3.897766456652587*^9,
3.898063740571079*^9, 3.8981563840712323`*^9, 3.898408430826607*^9,
3.8984351548460383`*^9, {3.898435656396911*^9, 3.898435669254348*^9}, {
3.898435723995041*^9, 3.898435756106928*^9}, {3.898435801766379*^9,
3.898435860363358*^9}, {3.8984363304828777`*^9, 3.898436370397313*^9}, {
3.898446472205254*^9, 3.898446473520159*^9}, 3.8984467579835277`*^9,
3.898446809227191*^9, 3.898454748128085*^9, 3.8984556216634617`*^9,
3.898455721192382*^9, 3.898606683499403*^9, 3.898609127002952*^9,
3.898611142260786*^9, 3.9145366388321037`*^9, {3.9145379030524445`*^9,
3.9145379099596443`*^9}, {3.932179812795988*^9, 3.932179814352871*^9}, {
3.9321800174040127`*^9, 3.9321800743540344`*^9}, {3.9321802007243156`*^9,
3.9321802280639744`*^9}, {3.9321802846508484`*^9, 3.932180285851782*^9}, {
3.93218044012788*^9, 3.9321804716871586`*^9}, 3.9321806804553623`*^9, {
3.9321809864945545`*^9, 3.9321809902642937`*^9}, 3.932199173033457*^9,
3.932199309312519*^9, {3.932202403415554*^9, 3.9322024111465454`*^9}, {
3.9322027620821323`*^9, 3.9322027802294903`*^9}, {3.9322028250198784`*^9,
3.9322028373798237`*^9}, 3.938233332313484*^9, 3.9438387395779*^9,
3.943839566969303*^9, {3.9438425631638737`*^9, 3.9438426522986736`*^9}, {
3.9438426854382553`*^9, 3.943842686578739*^9}, {3.945073302497778*^9,
3.9450733574917736`*^9}, {3.9450734221322727`*^9,
3.9450734290000744`*^9}, {3.945073460424366*^9, 3.945073461515524*^9}},
CellLabel->
"Out[152]=",ExpressionUUID->"95ab126d-658d-ca45-9ffc-90747a61b12c"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell["CoefficientSeparation \:7cfb\:6570\:5206\:5272", "Subsection",
CellChangeTimes->{
3.8812488993542614`*^9, {3.889059222842462*^9, 3.889059230348847*^9}, {
3.889059334651242*^9, 3.8890593390963335`*^9}, {3.898449598065941*^9,
3.8984495983214264`*^9}, {3.898449752155682*^9,
3.898449752667647*^9}},ExpressionUUID->"f82db896-cd4c-4cc8-84ca-\
4dbb44229ec2"],
Cell["CoefficientSeparation[expr,x] \:8fd4\:56de expr \
\:7cfb\:6570\:548c\:4f59\:4e0b\:90e8\:5206.", "Text",
CellChangeTimes->{{3.898442769504498*^9, 3.89844277134929*^9}, {
3.8984428996137834`*^9, 3.89844290450721*^9}, {3.898449597409689*^9,
3.898449601916279*^9}, {3.8984497555514064`*^9, 3.8984497583550634`*^9}, {
3.898457223945739*^9, 3.898457227852154*^9}, {3.898610170898191*^9,
3.898610180481199*^9},
3.9321994254542713`*^9},ExpressionUUID->"cac3d7bd-9954-4405-a7e5-\
ac9b6cc45796"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "CoefficientSeparation", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "CoefficientSeparation", "]"}], "=",
RowBox[{"{", "Listable", "}"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"CoefficientSeparation", "[",
RowBox[{"expr_", ",", "x_Symbol"}], "]"}], "/;",
RowBox[{"FreeQ", "[",
RowBox[{"expr", ",", "x"}], "]"}]}], ":=",
RowBox[{"{",
RowBox[{"expr", ",", "1"}], "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"CoefficientSeparation", "[",
RowBox[{"expr_", ",", "x_Symbol"}], "]"}], ":=",
RowBox[{"Replace", "[",
RowBox[{"expr", ",",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Longest", "[", "c_.", "]"}], "r_"}], "/;",
RowBox[{"FreeQ", "[",
RowBox[{"c", ",", "x"}], "]"}]}], "\[Rule]",
RowBox[{"{",
RowBox[{"c", ",", "r"}], "}"}]}]}], "]"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"CoefficientSeparation", "[",
RowBox[{
RowBox[{"{",
RowBox[{"0", ",",
FractionBox[
RowBox[{"a", "+", "b"}], "2"], ",",
FractionBox["2",
RowBox[{"a", "+", "b"}]], ",",
FractionBox[
RowBox[{"a", "+", "b"}],
RowBox[{"2", "x"}]], ",", "x", ",",
RowBox[{"-", "x"}]}], "}"}], ",", "x"}], "]"}], "//",
"TimingTest"}], "\[IndentingNewLine]",
RowBox[{"CoefficientSeparation", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"2", "a", " ",
RowBox[{"Sin", "[", "x", "]"}]}], "+",
RowBox[{"4", "a", " ", "x"}]}], ",",
RowBox[{
RowBox[{
RowBox[{"2", "a", " ",
RowBox[{"Sin", "[", "x", "]"}]}], "+",
RowBox[{"4", "a", " ", "x"}]}], "//", "Simplify"}]}], "}"}], ",",
"x"}], "]"}]}], "Input",
CellChangeTimes->{{3.881241904847962*^9, 3.881241987198187*^9}, {
3.881242031240831*^9, 3.881242046928899*^9}, {3.881242387184583*^9,
3.881242405022174*^9}, 3.8812525017519813`*^9, {3.8812633706399508`*^9,
3.8812633878811007`*^9}, {3.882200537029644*^9, 3.882200563996333*^9}, {
3.8822006123689237`*^9, 3.882200614089099*^9}, {3.882200672506434*^9,
3.8822006780377517`*^9}, 3.882200806127757*^9, {3.889053751411551*^9,
3.889053808475528*^9}, {3.8890539727361536`*^9, 3.8890540057319794`*^9}, {
3.8890540808730783`*^9, 3.889054096899433*^9}, 3.889054548713455*^9, {
3.8890549209593997`*^9, 3.889054935737418*^9}, {3.889054994449294*^9,
3.889055019502039*^9}, 3.889055095805949*^9, {3.889055129243005*^9,
3.889055150173757*^9}, {3.889055359990751*^9, 3.889055390612606*^9}, {
3.8890557736609335`*^9, 3.889055786978454*^9}, {3.889055898163913*^9,
3.889055938055687*^9}, {3.889058591883483*^9, 3.8890585989581165`*^9}, {
3.8890586398201175`*^9, 3.8890586412915077`*^9}, {3.88905868475479*^9,
3.889058689402967*^9}, {3.889059226951191*^9, 3.889059228236294*^9}, {
3.889059331118971*^9, 3.889059331132559*^9}, {3.889059794910117*^9,
3.889059809706137*^9}, {3.8890598511338387`*^9, 3.889059968589416*^9},
3.889060009495178*^9, {3.889060075719466*^9, 3.889060098112715*^9}, {
3.897558364547163*^9, 3.897558442773342*^9}, {3.8975584744493303`*^9,
3.897558503100176*^9}, 3.897558650637293*^9, 3.897569584801552*^9,
3.897575905705415*^9, {3.897579653175608*^9, 3.897579714352124*^9},
3.897579766178024*^9, {3.8975800644007626`*^9, 3.897580238765965*^9}, {
3.897580284566328*^9, 3.897580362279025*^9}, {3.897580985214338*^9,
3.897580997506344*^9}, 3.897581037879461*^9, {3.897582758394968*^9,
3.897582760290159*^9}, {3.897583549575282*^9, 3.897583550515018*^9}, {
3.898589763371834*^9, 3.8985897911384*^9}, {3.8985908936908107`*^9,
3.89859091973178*^9}, {3.8985970137544985`*^9, 3.898597034357772*^9},
3.898597228026992*^9, {3.898602066876213*^9, 3.8986020676554585`*^9},
3.898606546101079*^9, {3.914536557099825*^9, 3.9145365598718166`*^9},
3.914537112138218*^9, {3.9145379145781975`*^9, 3.9145379174891224`*^9}, {
3.9321808872099876`*^9, 3.932180910317108*^9}, {3.9321810073520412`*^9,
3.9321810073700676`*^9}, {3.9423644040596905`*^9, 3.942364410879442*^9}, {
3.9450732306608734`*^9,
3.9450732416059055`*^9}},ExpressionUUID->"fcfad0f7-8d74-470f-91b3-\
73e347e63cc7"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0000809`", ",",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"0", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
FractionBox[
RowBox[{"a", "+", "b"}], "2"], ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
FractionBox["2",
RowBox[{"a", "+", "b"}]], ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{
FractionBox[
RowBox[{"a", "+", "b"}], "2"], ",",
FractionBox["1", "x"]}], "}"}], ",",
RowBox[{"{",
RowBox[{"1", ",", "x"}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "1"}], ",", "x"}], "}"}]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{{3.897558477849747*^9, 3.8975585118808317`*^9},
3.8975586521472745`*^9, 3.8975759062882*^9, {3.897579656381521*^9,
3.897579714832854*^9}, 3.897579766714163*^9, 3.897580065988538*^9,
3.897580096336375*^9, {3.8975801533714905`*^9, 3.8975802396176*^9}, {
3.897580292129888*^9, 3.897580296641071*^9}, {3.897580337834595*^9,
3.8975803654456844`*^9}, {3.897580975744693*^9, 3.8975809984897594`*^9},
3.897581038282967*^9, {3.897582684765128*^9, 3.8975826887720456`*^9},
3.89758276136832*^9, 3.8975836640289726`*^9, 3.897766456789195*^9,
3.898063740689612*^9, 3.8981563845709305`*^9, 3.898408430984356*^9,
3.8984351549460683`*^9, {3.898438656375563*^9, 3.898438660458484*^9}, {
3.89844647585527*^9, 3.8984464844664927`*^9}, {3.8984467538399878`*^9,
3.898446759931337*^9}, 3.898446811186708*^9, 3.898455623711498*^9,
3.898455721272382*^9, 3.898456049671982*^9, {3.898553622416314*^9,
3.898553627259944*^9}, {3.8985908990145597`*^9, 3.898590920677238*^9}, {
3.898597024824809*^9, 3.89859703921821*^9}, 3.8985972290001187`*^9, {
3.898602068641824*^9, 3.8986020722671957`*^9}, {3.898606687769932*^9,
3.8986066898265033`*^9}, 3.898611144532957*^9, {3.9137928493184776`*^9,
3.9137928534276447`*^9}, 3.91453657856748*^9, 3.9145371195434055`*^9,
3.914537918371378*^9, 3.9321808543721275`*^9, {3.9321809045418797`*^9,
3.9321809106505833`*^9}, 3.932199310357744*^9},
CellLabel->"Out[76]=",ExpressionUUID->"fd918071-895f-2b43-a9c3-46b9a59f9155"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"1", ",",
RowBox[{
RowBox[{"4", " ", "a", " ", "x"}], "+",
RowBox[{"2", " ", "a", " ",
RowBox[{"Sin", "[", "x", "]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"2", " ", "a"}], ",",
RowBox[{
RowBox[{"2", " ", "x"}], "+",
RowBox[{"Sin", "[", "x", "]"}]}]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{{3.897558477849747*^9, 3.8975585118808317`*^9},
3.8975586521472745`*^9, 3.8975759062882*^9, {3.897579656381521*^9,
3.897579714832854*^9}, 3.897579766714163*^9, 3.897580065988538*^9,
3.897580096336375*^9, {3.8975801533714905`*^9, 3.8975802396176*^9}, {
3.897580292129888*^9, 3.897580296641071*^9}, {3.897580337834595*^9,
3.8975803654456844`*^9}, {3.897580975744693*^9, 3.8975809984897594`*^9},
3.897581038282967*^9, {3.897582684765128*^9, 3.8975826887720456`*^9},
3.89758276136832*^9, 3.8975836640289726`*^9, 3.897766456789195*^9,
3.898063740689612*^9, 3.8981563845709305`*^9, 3.898408430984356*^9,
3.8984351549460683`*^9, {3.898438656375563*^9, 3.898438660458484*^9}, {
3.89844647585527*^9, 3.8984464844664927`*^9}, {3.8984467538399878`*^9,
3.898446759931337*^9}, 3.898446811186708*^9, 3.898455623711498*^9,
3.898455721272382*^9, 3.898456049671982*^9, {3.898553622416314*^9,
3.898553627259944*^9}, {3.8985908990145597`*^9, 3.898590920677238*^9}, {
3.898597024824809*^9, 3.89859703921821*^9}, 3.8985972290001187`*^9, {
3.898602068641824*^9, 3.8986020722671957`*^9}, {3.898606687769932*^9,
3.8986066898265033`*^9}, 3.898611144532957*^9, {3.9137928493184776`*^9,
3.9137928534276447`*^9}, 3.91453657856748*^9, 3.9145371195434055`*^9,
3.914537918371378*^9, 3.9321808543721275`*^9, {3.9321809045418797`*^9,
3.9321809106505833`*^9}, 3.9321993103600674`*^9},
CellLabel->"Out[77]=",ExpressionUUID->"088c6a99-9ad9-4642-9f3d-f00fc5b7f51f"]
}, Open ]]
}, Closed]]
}, Open ]],
Cell[CellGroupData[{
Cell["\:591a\:9879\:5f0f", "Section",
CellChangeTimes->{{3.9448955874510517`*^9, 3.944895592177948*^9}, {
3.9448956332010193`*^9,
3.9448956333808136`*^9}},ExpressionUUID->"a3de89b7-2f6e-4048-9984-\
17fff659781c"],
Cell[CellGroupData[{
Cell["FirstCoefficient \:9996\:7cfb\:6570", "Subsection",
CellChangeTimes->{{3.898590933198619*^9,
3.8985909382322283`*^9}},ExpressionUUID->"89c387f1-dd97-41a3-90cb-\
4db1bffdf564"],
Cell["\<\
FirstCoefficient[poly,x] \:8fd4\:56de poly \:6700\:9ad8\:6b21\:9879\:7684\
\:7cfb\:6570.
\:51fa\:4e8e\:6027\:80fd\:8003\:8651\:672a\:7ea6\:675f\:53c2\:6570\
\>", "Text",
CellChangeTimes->{{3.898610184981613*^9, 3.8986101983149424`*^9}, {
3.8986103523489776`*^9, 3.898610353229575*^9}, 3.932199446743845*^9,
3.932199493085638*^9, {3.9450731927064056`*^9,
3.9450732046476536`*^9}},ExpressionUUID->"6493e7f2-50c6-4d8d-b495-\
c138e6c9f62d"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "FirstCoefficient", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "FirstCoefficient", "]"}], "=",
RowBox[{"{", "Listable", "}"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"FirstCoefficient", "[",
RowBox[{"poly_", ",", "x_Symbol"}], "]"}], ":=",
RowBox[{"Coefficient", "[",
RowBox[{"poly", ",", "x", ",",
RowBox[{"Exponent", "[",
RowBox[{"poly", ",", "x"}], "]"}]}], "]"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"FirstCoefficient", "[",
RowBox[{
RowBox[{"{",
RowBox[{"1", ",",
RowBox[{
RowBox[{"3",
SuperscriptBox["x", "3"]}], "-",
SuperscriptBox["x", "2"], "+", "1"}], ",",
RowBox[{
RowBox[{
RowBox[{"-",
FractionBox["1", "4"]}],
SuperscriptBox["x", "2"]}], "+", "1"}]}], "}"}], ",", "x"}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.898589673473645*^9, 3.8985897544065294`*^9}, {
3.898592003069106*^9, 3.898592080184589*^9}, 3.898594848623205*^9,
3.898597231069063*^9, 3.898600954969085*^9, 3.898602061963065*^9,
3.9145371115795193`*^9, {3.9145371522661495`*^9, 3.914537153047247*^9}, {
3.914537921816139*^9, 3.9145379240195045`*^9}, {3.9423644040616913`*^9,
3.942364410883444*^9}, {3.944895823017109*^9, 3.9448958337712364`*^9}},
CellLabel->"In[22]:=",ExpressionUUID->"196e9c4c-8e73-420a-a732-bccd77d95dd9"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0000462`", ",",
RowBox[{"{",
RowBox[{"1", ",", "3", ",",
RowBox[{"-",
FractionBox["1", "4"]}]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{{3.898592046781853*^9, 3.8985920910924697`*^9}, {
3.898594848950958*^9, 3.8985948659086447`*^9}, 3.898597231547406*^9,
3.898600874412503*^9, 3.898600960006827*^9, 3.898602063971583*^9,
3.898606702524988*^9, 3.8986111481808834`*^9, 3.91379857362611*^9, {
3.9145371365154743`*^9, 3.914537154558874*^9}, 3.914537924323555*^9,
3.9321810607292023`*^9, 3.9321993126784706`*^9, {3.944895823747097*^9,
3.9448958361873264`*^9}},
CellLabel->"Out[25]=",ExpressionUUID->"6550bf44-8376-fb47-90ee-7c4bbbeceae5"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell["PolynomialReverse \:591a\:9879\:5f0f\:53cd\:5411", "Subsection",
CellChangeTimes->{{3.9147510146228924`*^9,
3.914751032183683*^9}},ExpressionUUID->"14e2f2e0-8ee6-3544-8c8c-\
82b3ffc96ff7"],
Cell["PolynomialReverse[poly,x] \:7ed9\:51fa poly \:7684\:53cd\:5411\:591a\
\:9879\:5f0f.", "Text",
CellChangeTimes->{{3.932199318003521*^9, 3.9321993550889606`*^9},
3.9321994529949417`*^9, 3.932199489351551*^9, {3.932199529863592*^9,
3.932199530180691*^9}},ExpressionUUID->"d686c8da-414c-8b4d-b201-\
25e0077e2e17"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "PolynomialReverse", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"PolynomialReverse", "[",
RowBox[{"poly_", ",", "x_Symbol"}], "]"}], "/;",
RowBox[{"PolynomialQ", "[",
RowBox[{"poly", ",", "x"}], "]"}]}], ":=",
RowBox[{"FromDigits", "[",
RowBox[{
RowBox[{"CoefficientList", "[",
RowBox[{"poly", ",", "x"}], "]"}], ",", "x"}], "]"}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{
RowBox[{"PolynomialReverse", "[",
RowBox[{"poly_", ",", "x_Symbol", ",", "n_Integer"}], "]"}], "/;",
RowBox[{"PolynomialQ", "[",
RowBox[{"poly", ",", "x"}], "]"}]}], ":=",
RowBox[{"FromDigits", "[",
RowBox[{
RowBox[{"PadRight", "[",
RowBox[{
RowBox[{"CoefficientList", "[",
RowBox[{"poly", ",", "x"}], "]"}], ",",
RowBox[{"n", "+", "1"}]}], "]"}], ",", "x"}], "]"}]}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"PolynomialReverse", "[",
RowBox[{
RowBox[{
RowBox[{"a", " ",
SuperscriptBox["x", "4"]}], "+",
RowBox[{"b", " ",
SuperscriptBox["x", "3"]}], "+",
RowBox[{"c", " ",
SuperscriptBox["x", "2"]}], "+",
RowBox[{"d", " ", "x"}], "+", "e"}], ",", "x"}], "]"}], "//",
"TimingTest"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"PolynomialReverse", "[",
RowBox[{
RowBox[{"x", "+", "1"}], ",", "x", ",", "2"}], "]"}], "//",
"TimingTest"}]}], "Input",
CellChangeTimes->{{3.914751034145424*^9, 3.9147510831051197`*^9}, {
3.9147875042987366`*^9, 3.914787718098652*^9}, {3.9147877843168583`*^9,
3.9147878405667534`*^9}, {3.942364404066427*^9,
3.9423644108854427`*^9}},ExpressionUUID->"0d765881-d98c-5843-b3f9-\
9941a7470981"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0001692`", ",",
RowBox[{"a", "+",
RowBox[{"b", " ", "x"}], "+",
RowBox[{"e", " ",
SuperscriptBox["x", "4"]}], "+",
RowBox[{
SuperscriptBox["x", "2"], " ",
RowBox[{"(",
RowBox[{"c", "+",
RowBox[{"d", " ", "x"}]}], ")"}]}]}]}], "}"}]], "Output",
CellChangeTimes->{
3.914751084192091*^9, 3.9147875135588455`*^9, {3.914787588688801*^9,
3.914787598773525*^9}, {3.9147876979051495`*^9, 3.9147877185737877`*^9},
3.914787793681343*^9, {3.914787827661293*^9, 3.914787841254938*^9},
3.9321905763579884`*^9, 3.932199313821371*^9},
CellLabel->"Out[85]=",ExpressionUUID->"61f2fa8c-1e5f-f44a-b703-ceb5a7ccfa31"],
Cell[BoxData[
RowBox[{"{",
RowBox[{"0.0000676`", ",",
RowBox[{"x", "+",
SuperscriptBox["x", "2"]}]}], "}"}]], "Output",
CellChangeTimes->{
3.914751084192091*^9, 3.9147875135588455`*^9, {3.914787588688801*^9,
3.914787598773525*^9}, {3.9147876979051495`*^9, 3.9147877185737877`*^9},
3.914787793681343*^9, {3.914787827661293*^9, 3.914787841254938*^9},
3.9321905763579884`*^9, 3.932199313826153*^9},
CellLabel->"Out[86]=",ExpressionUUID->"66c622b6-62e2-7141-8ce1-9355809b4ef3"]
}, Open ]]
}, Closed]],
Cell[CellGroupData[{
Cell["PolynomialRoots \:591a\:9879\:5f0f\:6839", "Subsection",
CellChangeTimes->{{3.898604963887044*^9, 3.8986049783524084`*^9},
3.9321848295643272`*^9},ExpressionUUID->"6c130562-e9c8-41d9-b399-\
a7890f72a94b"],
Cell["PolynomialRoots[poly,x] \:8fd4\:56de poly \:7684\:6839.", "Text",
CellChangeTimes->{{3.898605205249858*^9, 3.898605215800286*^9}, {
3.898609581153407*^9, 3.898609599232883*^9}, 3.898609855989557*^9, {
3.898610211152465*^9, 3.898610320232235*^9}, {3.89861092954615*^9,
3.8986109402660465`*^9}, {3.9145373939703484`*^9,
3.9145373941642494`*^9}, {3.9321812558891163`*^9, 3.932181267894762*^9},
3.932184835587734*^9, {3.9321994586794453`*^9,
3.932199485075964*^9}},ExpressionUUID->"db99bed0-9ac0-4477-863e-\
c037c42ecb18"],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"ClearAll", "[", "PolynomialRoots", "]"}], ";"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"Attributes", "[", "PolynomialRoots", "]"}], "=",
RowBox[{"{", "Listable", "}"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Options", "[", "PolynomialRoots", "]"}], "=",
RowBox[{"{",
RowBox[{
RowBox[{"Cubics", "->", "False"}], ",",
RowBox[{"Quartics", "->", "False"}]}], "}"}]}], ";"}],