Post Reply 
[CAS problem] High-precision operations in numerical solution equations
04-03-2020, 05:29 AM
Post: #4
RE: [CAS problem] High-precision operations in numerical solution equations
(04-02-2020 12:00 PM)parisse Wrote:  Your guess is at a singularity of the tan function (k*pi+pi/2), it's not surprising. You should rewrite your equation with atan
fsolve(x=atan(x)+100000*pi,x=100000*pi+pi/2)

About function header replacement, such as defining an anonymous function, f = lambda x, y: x + y,list(a,b)=[a,b]
I want f to act on list (a, b) and replace list with f. Replace list (a, b) with f (a, b).
A bit more complicated, such as list (list (a, b) ...), I want to replace the innermost list with f.

Based on your ideas, I wrote a bit of code.
Code:
plotlist((lambda l:map(range(0,length(l)-1),lambda index:(l[index])^2*sin(l[index+1]-(l[index]))))([seq(fsolve(equal(x,atan(x)+k*π),equal(x,(k+0.5)*π)),equal(k,1 .. 10000))]))

Got the error storm graph。


Attached File(s) Thumbnail(s)
   

study hard, improve every day
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [CAS problem] High-precision operations in numerical solution equations - yangyongkang - 04-03-2020 05:29 AM



User(s) browsing this thread: 1 Guest(s)