# 微分方程式の計算について　　　N0.5　－1　直接積分、変数分離形

###  学籍番号[＿＿＿＿＿＿＿＿＿]クラス[＿＿＿＿＿]　クラス番号[＿＿＿＿＿] 名前[＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿]

###########   1階常微分方程式　直接積分形

$$ \frac{dy}{dx}=f(x) $$
$$ y = \int f(x)dx = F(X)+C  $$    f(x) の原始関数を F(x) とする ,C は積分定数

##########   1階微分方程式　変数分離形

$$ \frac{dy}{dx}=f(x)g(y) $$
左をｙのみ、右をｘのみに変形して分離する   両辺をそれぞれ不定積分する
$$ \int \frac{1}{g(y)}dy = \int f(x)dx  $$    この積分からｙの解を求める


```python
from sympy import *
x, n , a ,C1, C2 ,C3 = symbols('x n a C1 C2 C3')
f,g,y = symbols('f g y' ,cls=Function)
init_printing()
m ='5///1'
i =0
```


```python
diffeq = Eq(y(x).diff(x, 1) ,  3*y(x))
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
dsolve(diffeq, y(x))
```


```python
diffeq = Eq(y(x).diff(x, 1) , y(x)/(x*(x+2)))
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
dsolve(diffeq, y(x))
```


```python
diffeq = Eq(y(x).diff(x, 1) , 2*y(x)*x)
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
dsolve(diffeq, y(x))
```


```python
diffeq = Eq(y(x).diff(x, 1) , y(x)**2/x**2)
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
dsolve(diffeq, y(x))
```


```python
diffeq = Eq(y(x).diff(x, 1) ,2*y(x)/(x+2))
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
simplify(dsolve(diffeq, y(x)))
```


```python
diffeq = Eq(y(x).diff(x, 1) ,1+3*y(x)/x)
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
simplify(dsolve(diffeq, y(x)))
```


```python
diffeq = Eq(y(x).diff(x, 1)+2*y(x) ,0)
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
reseq = dsolve(diffeq, y(x))
reseq
```


```python
f0 = Eq(reseq.rhs.subs(x,2),6)
c = solve(f0)
c
```


```python
reseq01 = reseq.subs(C1, c[0])
reseq01
```


```python
diffeq = Eq(y(x).diff(x, 1)+2*y(x)*x ,0)
i=i+1
print( 'No.',m,'---',i)
diffeq
```


```python
reseq = dsolve(diffeq, y(x))
reseq
```


```python
f0 = Eq(reseq.rhs.subs(x,0),1)
c = solve(f0)
c
```


```python
reseq01 = reseq.subs(C1, c[0])
reseq01
```


```python

```

795e41a0da10f544e57befd05810160824997752
ipynb
Jupyter Notebook
09_20181126-bibunhoteisiki-7-1-Ex&ans-1.ipynb
kt-pro-git-1/Calculus_Differential_Equation-public
d5deaf117e6841c4f6ceb53bc80b020220fd4814
MIT
2019-07-10T11:33:18.000Z
2019-07-10T11:33:18.000Z
09_20181126-bibunhoteisiki-7-1-Ex&ans-1.ipynb
kt-pro-git-1/Calculus_Differential_Equation-public
d5deaf117e6841c4f6ceb53bc80b020220fd4814
MIT
09_20181126-bibunhoteisiki-7-1-Ex&ans-1.ipynb
kt-pro-git-1/Calculus_Differential_Equation-public
d5deaf117e6841c4f6ceb53bc80b020220fd4814
MIT
Qwen/Qwen-72B
1. YES
2. YES