Legendre সিরিজ ডিফারেনশিয়েট করতে, পাইথনে polynomial.laguerre.legder() মেথড ব্যবহার করুন। এটি axis-এর দিক থেকে m বার ডিফারেনশিয়েট করা Legendre সিরিজ কোএফিশিয়েন্ট c রিটার্ন করে। প্রতিটি ইটারেশনে রেজাল্ট scl-দিয়ে গুণ করা হয়।
১ম প্যারামিটার, c হল Legendre সিরিজ কোএফিশিয়েন্টের একটি অ্যারে। যদি c মাল্টিডাইমেনশনাল হয়, তবে বিভিন্ন অক্ষ বিভিন্ন ভেরিয়েবলকে রিপ্রেজেন্ট করে যার ডিগ্রি প্রতিটি অক্ষে সংশ্লিষ্ট ইনডেক্স দ্বারা দেওয়া হয়। ২য় প্যারামিটার, m হল ডেরিভেটিভের সংখ্যা, নন-নেগেটিভ হতে হবে। (ডিফল্ট: ১)। ৩য় প্যারামিটার, scl হল একটি স্কেলার। প্রতিটি ডিফারেনশিয়েশনের সাথে scl গুণ করা হয়। চূড়ান্ত ফলাফল scl**m দিয়ে গুণ। এটি লিনিয়ার চেঞ্জ অফ ভেরিয়েবলের জন্য ব্যবহার হয়। (ডিফল্ট: ১)। ৪র্থ প্যারামিটার, axis হল वह অক্ষ যার ওপর ডেরিভেটিভ নেওয়া হয়। (ডিফল্ট: ০)।
ধাপসমূহ
প্রথমে, প্রয়োজনীয় লাইব্রেরি ইমপোর্ট করুন:
import numpy as np
from numpy.polynomial import legendre as L
কোএফিশিয়েন্টের একটি মাল্টিডাইমেনশনাল অ্যারে তৈরি করুন:
c = np.arange(4).reshape(2,2)
অ্যারে ডিসপ্লে করুন:
print("Our Array...\n", c)
ডাইমেনশন চেক করুন:
print("\nDimensions of our Array...\n", c.ndim)
ডেটাটাইপ পান:
print("\nDatatype of our Array object...\n", c.dtype)
শেপ পান:
print("\nShape of our Array object...\n", c.shape)
Legendre সিরিজ ডিফারেনশিয়েট করতে, পাইথনে polynomial.laguerre.legder() মেথড ব্যবহার করুন। এটি axis-এর দিক থেকে m বার ডিফারেনশিয়েট করা Legendre সিরিজ কোএফিশিয়েন্ট c রিটার্ন করে। প্রতিটি ইটারেশনে রেজাল্ট scl-দিয়ে গুণ করা হয়:
print("\nResult...\n", L.legder(c, axis = 1))
উদাহরণ
import numpy as np
from numpy.polynomial import legendre as L
# Create a multidimensional array of coefficients
c = np.arange(4).reshape(2,2)
# Display the array
print("Our Array...\n", c)
# Check the Dimensions
print("\nDimensions of our Array...\n", c.ndim)
# Get the Datatype
print("\nDatatype of our Array object...\n", c.dtype)
# Get the Shape
print("\nShape of our Array object...\n", c.shape)
# To differentiate a Legendre series, use the polynomial.laguerre.legder() method in Python
print("\nResult...\n", L.legder(c, axis = 1))
আউটপুট
Our Array... [[0 1]
[2 3]]
Dimensions of our Array... 2
Datatype of our Array object... int64
Shape of our Array object... (2, 2)
Result... [[1.]
[3.]]