Kernel: SageMath 9.6
Experiment Number 1
AIM: To Use SageMath as Advanced Calculator
Name: Snehal G Rakas
Roll no: 61
Section: E
Date: 8/05/2023
Basic numerical Computations
In [0]:
In [5]:
Out[5]:
196420
In [4]:
Out[4]:
735433
In [6]:
Out[6]:
381940
759**11 Returns 11th power of 759
In [7]:
Out[7]:
48157012271803961449924277680359
In [8]:
Out[8]:
3
In [9]:
Out[9]:
79/12
In [10]:
Out[10]:
6.58333333333333
In [11]:
Out[11]:
6.58333333333333
In [12]:
Out[12]:
6
In [13]:
Out[13]:
7
In [18]:
Out[18]:
-0.62988799427445387857
In [15]:
Out[15]:
-0.629887994274454
In [16]:
Out[16]:
0.554374336179161
In [17]:
Out[17]:
0.546302489843790
In [19]:
Out[19]:
-0.201357920790331
In [20]:
Out[20]:
2.71828182845905
In [21]:
Out[21]:
3.1415926535897932384626433832795028841971693993751
In [22]:
In [23]:
Out[23]:
4256894463620625471399338897976462846890230941821769298896221080707434902055990415666782999834652467105561645005135247510594550578570361904546802042930914680310390642433197638242918512304047044258861660945550782976855100391711791398500713833285909054634688620911207051946259440915349012504839365184529533518755428177370879723111743622910445124706269593256104219501887578284982300380039220456095383116526730085743873032838237773072593976177499478159793530051818413365412709223554005276531798500164384916741118247588065706396358679530916434991681240368497544405247600864215548296506680601289148053255684716608821820352021050028244591277208996891498042521087458841329716703518091675689367527272995883290329676158091022259824243125389761208343649293452081505395610821671083260346432722100756628487076760917971350441734334132117633025186198636599163163040922447934465322909545018661306558666998323928906394462759431335113344451854455546674490813919856400793256248896167909254939021724785145027873918136392996266973257470068635273673116279231080146181208818573897317247122622658823827561947836713192608335310969980444617575725662453866484897648923060190912757314122770275982764251413066524055645779981762560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
In [38]:
Out[38]:
1342
In [41]:
In [42]:
Out[42]:
0
In [43]:
Out[43]:
0
Defining Variables
In [44]:
Out[44]:
2345 4567
In [46]:
Out[46]:
True
In [48]:
Out[48]:
4567
In [49]:
Out[49]:
1
In [51]:
Out[51]:
10709615
In [52]:
Out[52]:
[53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
In [50]:
Out[50]:
541
Defining Functions
In [54]:
In [55]:
Out[55]:
7.18309969277139
In [56]:
Out[56]:
x |--> 2*x*cos(x^2)*e^(-x) - e^(-x)*sin(x^2) + 3
In [57]:
Out[57]:
x |--> -8*x^3*cos(x^2)*e^(-x) + 12*x^2*e^(-x)*sin(x^2) + 6*x*cos(x^2)*e^(-x) - 12*x*e^(-x)*sin(x^2) - 6*cos(x^2)*e^(-x) - e^(-x)*sin(x^2)
In [58]:
Out[58]:
x |--> 3/2*x^2 - 1/16*sqrt(pi)*((-(I + 1)*sqrt(2)*cos(1/4) + (I - 1)*sqrt(2)*sin(1/4))*erf(-1/2*(-1)^(3/4)*(2*I*x + 1)) + (-(I + 1)*sqrt(2)*cos(1/4) + (I - 1)*sqrt(2)*sin(1/4))*erf(-(1/4*I - 1/4)*sqrt(2)*(2*I*x + 1)) + ((I - 1)*sqrt(2)*cos(1/4) - (I + 1)*sqrt(2)*sin(1/4))*erf(-(1/4*I + 1/4)*sqrt(2)*(2*I*x - 1)) + (-(I - 1)*sqrt(2)*cos(1/4) + (I + 1)*sqrt(2)*sin(1/4))*erf(1/2*(2*I*x - 1)/sqrt(-I))) + x
In [61]:
Out[61]:
-0.141120008059867
In [65]:
Out[65]:
In [1]:
Out[1]:
[[x1 == (43/13), x2 == (19/13)]]
In [3]:
In [4]:
Out[4]:
In [6]:
Out[6]:
(None, -2.00000000000000)
In [7]:
In [8]:
Out[8]:
The area of Triangle is 8.78564169540279
In [9]:
Out[9]:
1275
In [13]:
Out[13]:
[x == 3, x == -2, x == 1]
In [17]:
Out[17]:
[[x == -sqrt(1/2*I*sqrt(7) + 5/2), y == 1/2*I*sqrt(7) + 1/2], [x == sqrt(1/2*I*sqrt(7) + 5/2), y == 1/2*I*sqrt(7) + 1/2], [x == -sqrt(-1/2*I*sqrt(7) + 5/2), y == -1/2*I*sqrt(7) + 1/2], [x == sqrt(-1/2*I*sqrt(7) + 5/2), y == -1/2*I*sqrt(7) + 1/2]]
In [19]:
Out[19]:
[[x == -sqrt(1/2*I*sqrt(7) + 5/2), y == 1/2*I*sqrt(7) + 1/2], [x == sqrt(1/2*I*sqrt(7) + 5/2), y == 1/2*I*sqrt(7) + 1/2], [x == -sqrt(-1/2*I*sqrt(7) + 5/2), y == -1/2*I*sqrt(7) + 1/2], [x == sqrt(-1/2*I*sqrt(7) + 5/2), y == -1/2*I*sqrt(7) + 1/2]]
In [25]:
Out[25]:
In [6]:
Out[6]:
[1,
2,
3,
4,
6,
7,
8,
9,
12,
14,
18,
21,
24,
27,
28,
36,
42,
54,
56,
63,
72,
81,
84,
108,
126,
162,
168,
189,
216,
243,
252,
324,
378,
486,
504,
567,
648,
756,
972,
1134,
1512,
1701,
1944,
2268,
3402,
4536,
6804,
13608]
In [4]:
Out[4]:
Number of digits: 2719
Number of zeros: 472
In [11]:
Out[11]:
x |--> 2*sqrt(sin(x) + 1)
In [15]:
Out[15]:
-96*x^3*sin(2*x) + 720*x^2*cos(2*x) + 1440*x*sin(2*x) + 24/x^5 - 720*cos(2*x)
In [23]:
In [24]:
Out[24]:
Enter the amount invested:
Enter the years of investment
1000
In [0]: