[CAS problem] High-precision operations in numerical solution equations
|
04-01-2020, 06:14 PM
(This post was last modified: 04-01-2020 06:16 PM by Albert Chan.)
Post: #2
|
|||
|
|||
RE: [CAS problem] High-precision operations in numerical solution equations
(04-01-2020 01:03 PM)yangyongkang Wrote: Hi everyone, I recently came across an x = tan (x) equation about x. Find x> 0, the solution over the Solver might converge to a root outside your required interval. It is better to solve for x, then calculate tan(x)-x XCas> guess := 10000.5*pi XCas> fsolve(tan(x)=x, x=guess) → 7.72525183694 XCas> fsolve(tan(x)=x, x=guess) → 4.49340945791 XCas> guess := 100000.5*pi → 314160.836155 XCas> x := fsolve(tan(x)=x,x=guess) → 314160.836155 (not shown, but slightly less than guess) XCas> tan(guess) - guess → 27378944702.1 XCas> tan(x) - x → 4735723246.82 XCas> x := 314160.836152 // Error for x is tiny, only -0.000003 XCas> tan(x) - x → -11691.0416004 For large guess (=pi/2 + k*pi), solved x is only slightly smaller. We can estimate tan(x) = cot(guess-x) ≈ 1/(guess-x), and x ≈ guess XCas> x := guess - 1/guess // "solved" tan(x)=x, we have x = 314160.836152123 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
[CAS problem] High-precision operations in numerical solution equations - yangyongkang - 04-01-2020, 01:03 PM
RE: [CAS problem] High-precision operations in numerical solution equations - Albert Chan - 04-01-2020 06:14 PM
RE: [CAS problem] High-precision operations in numerical solution equations - parisse - 04-02-2020, 12:00 PM
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)