Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
3774 views
ubuntu2004
1
def generator():
2
t,y,u = var("t y u")
3
yp = var("yp", latex_name="y'")
4
up = var("up", latex_name="u'")
5
cons = list(srange(3,9))
6
shuffle(cons)
7
m,n,p,q,a,b=cons
8
linear = (up+m*t^p*u==n*t^q)
9
odes = [
10
{
11
"ode": shuffled_equation(yp*t,-y,m*t^(p+1)*y,-n*t^(q+2)),
12
"sub": (u==y/t)
13
},
14
{
15
"ode": shuffled_equation(a,b*yp,a*m*t^(p+1),b*m*y*t^p,-n*t^q),
16
"sub": (u==a*t+b*y)
17
},
18
{
19
"ode": shuffled_equation((1-a)*yp,m*t^p*y,-n*t^q*y^a),
20
"sub": (u==y^(1-a))
21
},
22
]
23
shuffle(odes)
24
25
return {"odes":odes, "linear":linear}
26
27