Post Reply 
Solve App and Piecewise function
10-20-2015, 12:43 PM
Post: #1
Solve App and Piecewise function
Hello,

I try to solve two equations in Solve App.
E1: E=C MOD 5
E2: F=PIECEWISE(E not equal 0,E,E==0,5)
   
Then in Num view, uncheck C and enter C=5 and press Solve.
The answer of E is 0, OK
But, the answer of F is also 0, Wrong.
F is supposed to be 5.
   
Did I do anything wrong?
Find all posts by this user
Quote this message in a reply
10-21-2015, 07:15 AM
Post: #2
RE: Solve App and Piecewise function
You can not expect to solve these kind of systems/equations with a numeric solver (and it is not supported by the exact solver and won't be).
Find all posts by this user
Quote this message in a reply
10-21-2015, 09:19 AM
Post: #3
RE: Solve App and Piecewise function
Hi ,

Thanks for your reply!
If the Solve App allow user to solve multi equations, I will expect it can solve these equations.

See another example. If I modify the equations to as follows, the Solver work perfectly.
   
   

Sorry for my poor English.
Find all posts by this user
Quote this message in a reply
10-22-2015, 08:08 AM
Post: #4
RE: Solve App and Piecewise function
You are wrong:-)
I can not add safeguards everywhere because that would disable using the calc for legitimate systems. If for example I returned an error as soon as the user enters a discontinuous fonction, then you would not be able to solve a system at a continuous solution with a function having discontinuities.
The user is assumed to be the brain and the calc is assumed to compute.
Find all posts by this user
Quote this message in a reply
10-22-2015, 01:46 PM (This post was last modified: 10-22-2015 03:43 PM by cclinus.)
Post: #5
RE: Solve App and Piecewise function
Ok, but, why the second example work well?

Do you mean you make the Solve app? Or I misunderstand your meaning?

By the way, did you read my another post about solver , ABS() and IP().
I more concern that problem, because solver give wrong answer under some condition.

thanks!
Find all posts by this user
Quote this message in a reply
10-22-2015, 04:08 PM (This post was last modified: 10-22-2015 04:10 PM by Han.)
Post: #6
RE: Solve App and Piecewise function
(10-22-2015 01:46 PM)cclinus Wrote:  Ok, but, why the second example work well?

In the second example, your piecewise function consists of two functions that are each continuous on either half-open or half-closed intervals. In the first example, your piecewise function has a piece that is nowhere continuous.

A lot of numerical solving algorithms tend to use some sort of Newton process, which requires that the auxiliary function for the system to be continuous over some interval. As an example,

2x+3y = 5
5x-4y = 1

This system is equivalent to solving \( \vec{F}(x,y) = 0 \) where
\[ \vec{F}(x,y) = \begin{bmatrix} 2x+3y-5 \\ 5x-4y-1 \end{bmatrix} \]

Generally speaking, the zeroes of \( \vec{F}(x,y) \) can be estimated by Newton's method; however \( \vec{F} \) must be differentiable (and hence continuous) near the zero. This is why systems with piecewise functions where the solution itself occurs at a point of discontinuity will likely never be found by numerical methods (that use Newton-like processes).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: