0% found this document useful (0 votes)
28 views3 pages

aakashLAB1 1

This document contains examples of using basic mathematical functions in Mathematica like plotting graphs of functions, taking derivatives, and solving equations. It demonstrates plotting the graphs of functions like f(x)=x^2 and g(x)=x^3, taking the derivative of functions with respect to x like D[f[x],x], and using Solve to find solutions to equations like Solve[x^2-1==0,x].

Uploaded by

yadavmilth2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

aakashLAB1 1

This document contains examples of using basic mathematical functions in Mathematica like plotting graphs of functions, taking derivatives, and solving equations. It demonstrates plotting the graphs of functions like f(x)=x^2 and g(x)=x^3, taking the derivative of functions with respect to x like D[f[x],x], and using Solve to find solutions to equations like Solve[x^2-1==0,x].

Uploaded by

yadavmilth2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

NAME - Sarthak Gupta

Roll No. 22/6277


BASIC*OF*MATHEMATICA*"PRACTICAL O "
In[ ]:= N2  3
Out[ ]= 0.666667

In[ ]:= Pi

Out[ ]= π

In[ ]:= N[Pi]


Out[ ]= 3.14159

In[ ]:= x=2


y=4
x+y
Out[ ]= 2

Out[ ]= 4

Out[ ]= 6

x = 2;
y = 4;

In[ ]:= x+y


Out[ ]= 6

In[ ]:= ClearAll


Out[ ]= ClearAll

In[1]:= f[x_] = x ^ 2
f[10]
Out[1]= x2

Out[2]= 100

THIS IS MY FIRST PRACTICAL


2 Sarthak6277

In[4]:= Plot[f[x], {x, - 1, 1}]

1.0

0.8

0.6

Out[4]=

0.4

0.2

-1.0 -0.5 0.5 1.0

In[9]:= g[x_] = x ^ 3
Out[9]= x3

In[11]:= Plot[{f[x], g[x]}, {x, - 1, 1}]

1.0

0.5

Out[11]=
-1.0 -0.5 0.5 1.0

-0.5

-1.0

In[12]:= f[x, y] = x + y
f[x_, y_]
Out[12]= x+y

Out[13]= f[x_, y_]

In[15]:= f[2, y]

In[16]:= f[2, y]
f[x, 3]
Out[16]= f[2, y]

Out[17]= f[x, 3]

In[18]:= f[2, 3]
Out[18]= f[2, 3]
Sarthak6277 3

In[21]:= Plot3D[f[x, y], {x, - 1, 1}, {y, - 2, 2}]

Out[21]=

In[24]:= f[x] = x ^ 2;
D[f[x], x]
Out[25]= 2x

In[28]:= D[x ^ 2, {x, 2}]


Out[28]= 2

two variabl
In[29]:= f[x, y] = x + y
D[f[x, y], {x, y}]
Out[29]= x+y

Out[30]= 1 y⩵1
0 True

In[31]:= x^2 - 1 = 0
Solve[x ^ 2 - 1 ⩵ 0, x]
Set: Tag Plus in -1 + x2 is Protected.

Out[31]= 0

Out[32]= {{x → - 1}, {x → 1}}

x and y
In[34]:= Solve[{x + y ⩵ 0, x - y ⩵ 0}, {x, y}]
Out[34]= {{x → 0, y → 0}}

You might also like