- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
Latest commit
15 lines (12 loc) · 365 Bytes
/
Copy pathexample.py
File metadata and controls
15 lines (12 loc) · 365 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fromDifferentiateimportExpression
EXPR=["((((x^2.0)+4.0)/x)^((x*(2.0*m))-24.0))","((x*2.0)*(((x^2.0)+6.0)/m))","(((x^3.0)+(5.0*x))^((sin x)^2.0))"]
WRT=["x","m"]
forwrtinWRT:
forexprinEXPR:
print("Input :\n"+expr)
e=Expression(expr)
f=e.differentiate(wrt=wrt)
print("Output : (w.r.t. "+wrt+")")
res=f.toString(echo=True)
print()
print()