You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »


Here, we will aim to provide you with a number of exercises and solutions with a varying degree of difficulty. There will also occur exercises that requires you to use functions that has not yet been described in Symbolic mathematics.

If you have a suggestion on a topic you would like to see some more exercises (or tutorials) on, please send us a mail or leave a post on our Forum. We are more than happy to recieve feedback.

Page content

Integration

Exercise 1: Single integral

This example is taken from the 2018 exam in TMA4100 - Calculus 1, check out the exam and the solution for hand calculations (only in norwegain). This is task 2.

Compute the intregral

Solution
from sympy import *

# First we define our variable
x = Symbol('x')
# We then compute the answer for our given interval
ans = integrate(x*log(x**2), (x, 1, 4))     # log() without specifying the base equals ln()
# Finally, we print the answer
print(ans)


# Output:
-15/2 + 8*log(16)	# log() is here the natural logarithm

Exercise 2: Double integral


Exercise 3: Triple integral

Compute the integral




  • No labels