I know that under "with(student)" package, I can solve some integral by parts. I applied this to $int(x*sin(x),x)$ for example and got my answer but, couldn't use for $int(exp(x)*sin(x),x)$ . I ask if this rule command packaged under with(student) can be applied for a certain kinds of integral or not? Thanks for your help.
with(student):
s1 := Int(exp(x)*sin(x),x) = intparts(Int(exp(x)*sin(x),x),sin(x));
/ / / \
| | | |
| exp(x) sin(x) dx = exp(x) sin(x) - | | cos(x) exp(x) dx|
| | | |
/ \/ /
s2 := Int(exp(x)*cos(x),x) = expand( intparts(Int(exp(x)*cos(x),x),cos(x)) );
/ / / \
| | | |
| cos(x) exp(x) dx = cos(x) exp(x) + | | exp(x) sin(x) dx|
| | | |
/ \/ /
s3 := subs(s2,s1);
/
|
| exp(x) sin(x) dx = exp(x) sin(x) - cos(x) exp(x)
|
/
/ / \
| | |
- | | exp(x) sin(x) dx|
| | |
\/ /
s4 := lhs(s3) + Int(exp(x)*sin(x),x) = rhs(s3) + Int(exp(x)*sin(x),x);
/ / \
| | |
2 | | exp(x) sin(x) dx| = exp(x) sin(x) - cos(x) exp(x)
| | |
\/ /
lhs(s4)/2 = rhs(s4)/2;
/
| 1 1
| exp(x) sin(x) dx = - exp(x) sin(x) - - cos(x) exp(x)
| 2 2
/
...and we're done.