This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy.interactive import printing | |
from sympy import Eq, solve_linear_system, Matrix | |
from numpy import linalg | |
import numpy as np | |
import sympy as sp | |
printing.init_printing(use_latex=True) | |
eq1 = sp.Function('eq1') | |
eq2 = sp.Function('eq2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def createMatrix(): | |
_matrix = [] | |
ms=int(input("Enter no. of matrices to create: ")) | |
for i in range(ms): | |
print("\nMatrix %i"%(i+1)) | |
r=int(input("\tEnter no. of rows: ")) | |
c=int(input("\tEnter no. of columns: ")) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def createMatrix(): | |
_matrix = [] | |
ms=int(input("Enter no. of matrices to create: ")) | |
for i in range(ms): | |
print("\nMatrix %i"%(i+1)) | |
r=int(input("\tEnter no. of rows: ")) | |
c=int(input("\tEnter no. of columns: ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sympy as sp | |
from scipy.misc import derivative | |
x = sp.Symbol('x') | |
# y = sp.diff(3*x**2+1, x) | |
# print (y) | |
x = float(input("Enter x: ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# method 1 | |
import sympy as sp | |
x = sp.Symbol('x') | |
y = sp.diff(3*x**2+1, x) | |
print (y) | |
# method 2 | |
from scipy.misc import derivative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x1=int(input("Enter x1: ")) | |
x2=int(input("Enter x2: ")) | |
def f(x): | |
return x**4 - x - 10 | |
def form(x1, x2): | |
return ((x1 * f(x2) - x2 * f(x1)) / | |
(f(x2) - f(x1))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x1=int(input("Enter x1: ")) | |
x2=int(input("Enter x2: ")) | |
def f(x): | |
return x**4 - x - 10 | |
def form(x1, x2): | |
return ((x1 * f(x2) - x2 * f(x1)) / | |
(f(x2) - f(x1))) | |