Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Views: 1794
Image: 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
a = randrange(1,6)*choice([-1,1])
6
b = randrange(1,6)*choice([-1,1])
7
f = randrange(2,4)*choice([-1,1])*choice([
8
sin(t),
9
cos(t),
10
])
11
y_over_t = shuffled_equation(
12
y*yp*t,
13
-y^2,
14
y^2*t*f,
15
a^2*t^3*f
16
)*randrange(2,4)
17
at_y = shuffled_equation(
18
b,
19
yp,
20
b*t*f,
21
y*f,
22
a^2*f/(b*t+y)
23
)*randrange(2,4)
24
at_y_sub = (u==b*t+y)
25
separated = (u/(u^2+a^2)*up==-f)
26
swapped = choice([True,False])
27
28
return {
29
"y_over_t": y_over_t,
30
"at_y": at_y,
31
"at_y_sub": at_y_sub,
32
"separated": separated,
33
"swapped": swapped,
34
}
35
36