from sympy import * def pprints(func, *funcs): pprint(func), if funcs is None: return for f in funcs: pprint(f), init_printing() # 2.6 Example 2, p165 # Find the slope of circle x**2 + y**2 = 25 at the point (3, -4). x = symbols('x') y = Function('y')(x) z = symbols('z') # change the circle formula to an equation # x**2 + y**2 - 25 = 0 eq = x**2 + y**2 - 25 # Make a differential equation d_eq = diff(eq, x) roots = solve(d_eq, diff(y, x, 1)) _dydx = roots[0] pprints(eq, d_eq, _dydx) # access y(x) term # from sympy.core.function import AppliedUndef # _y = iter(dydx.atoms(AppliedUndef)).next() # replace y(x) with z dydx = _dydx.subs(Function('y')(x), z) slope = dydx.subs([(x, 3), (z, -4)]) print 'The slope is ', slope === Outupt === 2 2 x + y (x) - 25 d 2⋅x + 2⋅y(x)⋅──(y(x)) dx -x ──── y(x) The slope is 3/4
Archives
Categories
- Art (24)
- Bigger reality (68)
- Blender (33)
- DIY (166)
- GNU/Linux (101)
- Health (111)
- Motorcycle (44)
- Permaculture (121)
- Photography (118)
- Python (20)
- Reprap 3D Printer (122)
- Science and technologies (137)
- Uncategorized (65)
Website
- Doctor Yourself Health Homesteading website that promotes self reliance.
- Exploring Electric Universe
- F* THE BANK$ This website is run by a feisty group of Occupy Wall Street activists and members of the The Other 98%…
- Professor Ph. M. Kanarev's Books and Lectures Professor Kanarev has developed a new theory of a Microcosm and Mechanodynamics that open up Free Energy technologies.
- Wade Frazier's personal website Free Energy technologies, alternative medicine, abundance paradigm
- 3D modeling
- 3D printer
- 2006 Yamaha R1
- bike
- bird
- birds
- blender
- Blender 2.69
- Buckminster Fuller
- Bulbul Junior
- Calculus
- calibration
- Canon EOS 1000D
- Canon Rebel XS
- cat
- convert
- corrupted system
- COVID-19
- Debian GNU/Linux
- Debian Wheezy
- Devuan
- Digital Camera
- Digital photography
- DIY
- dog
- E3D V6 Hotend
- electronics
- ffmpeg
- Free Energy
- geodesic dome
- GIMP
- GNU/Linux
- GoPro HD Hero2
- health
- helmet
- house project
- Hydraulic press
- ImageMagick
- mathematics
- Mini Kossel
- motorcycle
- Natural Farming
- nature
- Neal Hirsig
- Nikon D200
- OpenSCAD
- open source
- Original Prusa i3 MK2
- Permaculture
- photography
- Physics
- PLA
- plant
- python
- reprap
- Reprap 3D Printer
- Rice
- science
- sculpture
- SmaTrig
- Sony A6000
- Steel Fisher
- steel pipe
- Stop5G
- SymPy
- technology
- time lapse
- truth
- vaccine
- Wheezy
- wood working
- 기술
- 두차
- 쌀
- 자연농사