質問編集履歴

2

疑問点を明瞭に示した。

2018/09/15 06:50

投稿

touho
touho

スコア26

test CHANGED
File without changes
test CHANGED
@@ -42,9 +42,13 @@
42
42
 
43
43
  func_2 = sym.diff(func_1, a)
44
44
 
45
+
46
+
45
47
  # func_2=func_2.expand().subs(sym.integrate(2*a*x(i), (i, -oo, oo)),2*a*sym.integrate(x(i), (i, -oo, oo))).subs(sym.integrate(-2*i*x(i), (i, -oo, oo)),-2*sym.integrate(i*x(i), (i, -oo, oo)))
46
48
 
47
49
  func_2=func_2.expand()
50
+
51
+
48
52
 
49
53
  # func_2=func_2.subs(func_2.args[0],2*a*sym.integrate(x(i), (i, -oo, oo))).subs(func_2.args[1],-2*sym.integrate(i*x(i), (i, -oo, oo)))
50
54
 
@@ -52,11 +56,9 @@
52
56
 
53
57
 
54
58
 
55
- func_3 = sym.solve(func_2)
59
+ # func_3 = sym.solve(func_2)
56
60
 
57
-
58
-
59
- func_1,func_2,func_3
61
+ func_2
60
62
 
61
63
  ```
62
64
 
@@ -66,7 +68,11 @@
66
68
 
67
69
 
68
70
 
69
- Integral((-a + x)**2*f(x), (x, -oo, oo)) Integral(2*a*f(x), (x, -oo, oo)) + Integral(-2*x*f(x), (x, -oo, oo)) []
71
+ Integral(2*a*f(x), (x, -oo, oo)) + Integral(-2*x*f(x), (x, -oo, oo))
72
+
73
+
74
+
75
+ この積分において、2とかaの部分がくくりだされてほしいいわけです。
70
76
 
71
77
 
72
78
 

1

記入漏れの補完

2018/09/15 06:50

投稿

touho
touho

スコア26

test CHANGED
File without changes
test CHANGED
@@ -17,6 +17,8 @@
17
17
 
18
18
 
19
19
  ```python
20
+
21
+ import sympy as sym
20
22
 
21
23
 
22
24