Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
46 lines (39 loc) · 1.06 KB

File metadata and controls

46 lines (39 loc) · 1.06 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package symjava.examples;
import symjava.domains.Domain;
import symjava.domains.Domain2D;
import symjava.domains.Domain3D;
import symjava.math.SymMath;
import symjava.math.Transformation;
import symjava.relational.Eq;
import symjava.symbolic.*;
import static symjava.symbolic.Symbol.*;
public class Example5 {
public static void main(String[] args) {
example1();
example2();
}
public static void example1() {
Domain D = new Domain2D("D",x,y);
Integrate I1 = new Integrate(0.5*(x+y), D);
System.out.println(I1);
Transformation trans = new Transformation(
new Eq(x, r/2),
new Eq(y, 3*s)
);
Expr I1c = I1.changeOfVars(trans);
System.out.println(I1c);
}
public static void example2() {
Domain D = new Domain3D("D",x,y,z);
Func F = new Func("F", r, s, t);
Func G = new Func("G", r, s, t);
Func H = new Func("H", r, s, t);
Transformation trans = new Transformation(
new Eq(x, F),
new Eq(y, G),
new Eq(z, H)
);
Integrate I = new Integrate(SymMath.pow(x+y+z,2), D).changeOfVars(trans);
System.out.println(I);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.