|
⇤ ← Revision 1 as of 2010-12-15 12:57:51
Size: 670
Comment:
|
Size: 751
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
| return diff(diff(y1)) + y1 == 0 and diff(diff(y2)) + y2 == 0 | if diff(diff(y1)) + y1 == 0 and diff(diff(y2)) + y2 == 0: return 'solution' else: return 'not a solution' |
| Line 13: | Line 16: |
| return diff(y1/y2) == 0 | if diff(y1/y2) == 0: return 'const' else: return 'not a const' |
| Line 15: | Line 21: |
| if solve(cos(x), sin(x)): print 'const' else: print 'not a const' |
print solve(cos(x), sin(x)) |
Book
Advanced Engineering Mathematics
Author
Erwin Kreyszig
Edition
8th Edition
# page 69 EXAMPLE 6
reset()
def verify(y1, y2):
if diff(diff(y1)) + y1 == 0 and diff(diff(y2)) + y2 == 0:
return 'solution'
else:
return 'not a solution'
def solve(y1, y2):
if diff(y1/y2) == 0:
return 'const'
else:
return 'not a const'
print verify(cos(x), sin(x))
print solve(cos(x), sin(x))
Solution by:
<T R Shyam Sundar>, <Student>, <CMI>
<Sonam Kumar>, <Student>, <CMI>
<Vignesh Ganapathiraman>, <Student> <CMI>
<Pooja Kalra>, <Student>, <Malwa Institute of Technology>
