Jump to content



Photo
- - - - -

Difficult Cas Problems In Classpad


  • Please log in to reply
73 replies to this topic

#41 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 24 September 2005 - 09:16 AM

I don't think that there is need to send you an eActivity containing that expression. It's correct, as it is written here.
See if there is a variable named "y" in your current directory. If it is, ClassPad cannot treat y(x) as an unknown function. I bet that this is the reason for your error. Try another name for that function, or delete the variable "y" from your current directory (if you are writing the expression in an eActivity, the current directory is "eAct").


yeah , my current folder is "main"

clear_a_z
I changed the y(x) to w(x) z(x) , ....
but I recieve the same Error !

It,s Important for me , please solve my problem , thanks.
what is your Os version ? mine is 2.2

#42 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 24 September 2005 - 09:28 AM

yeah , my current folder is "main"
clear_a_z
I changed the y(x) to w(x) z(x) , ....
but I recieve the same Error !
It,s Important for me , please solve my problem , thanks.
what is your Os version ? mine is 2.2

Make sure that you are not in "Approx" mode. If this does not work, give me more details: what exactly are the CAS settings in your ClassPad?
My OS is 2.2, as yours.

#43 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 24 September 2005 - 09:35 AM

thanks .
every thing is ok now!

I,m sorry , I bothered you :(

#44 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 24 September 2005 - 09:43 AM

thanks .
every thing is ok now!
I,m sorry , I bothered you :(

You are welcome. Nice to know that I was able to help. Always remember: the CAS doesn't like the "Approx" mode much.

#45 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 24 September 2005 - 09:51 AM

you have 2 post containing Integration function
A function to Compute difficult indefinite integrals by sunstitution
I understand the first one but not the second
If it is possible explain more about it.

now when Cplua support the complete CAS you can make a perfect program to Compute any Integration :)

#46 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 24 September 2005 - 11:19 AM

you have 2 post containing Integration function
A function to Compute difficult indefinite integrals by sunstitution
I understand the first one but not the second
If it is possible explain more about it.
now when Cplua support the complete CAS you can make a perfect program to Compute any Integration :)

Assuming that you mean the expression

integrate((intgrand|solve(subst,x)) diff(getRight(solve(subst,x)),u),u)|solve(subst,u)

all it does is to simply concatenate the expressions in the previous post into one larger expression, in order to be defined as a function f(intgrand,subst). To understand its use, assume that you call it as

f(x exp(x^2), x=sqrt(u))

Now, intgrand|solve(subst,x) substitutes x with sqrt(u). This transforms x exp(x^2) to sqrt(u) exp(u). To integrate the result, we need to transform dx as well, i.e., dx=(dx/du)du. This is done by

diff(getRight(solve(subst,x)),u),u)|solve(subst,u)

Now, look at this expression: solve(subst,x) yields simply x=sqrt(u) in our example. getRight(solve(subst,x)) takes the right part of this equation, yielding sqrt(u). diff(getRight(solve(subst,x)),u) differentiates it with respect to u, yielding 1/(2 sqrt(u)), i.e., dx/du. This is multiplied by sqrt(u) exp(u) yielding exp(u)/2. The expression

integrate((intgrand|solve(subst,x)) diff(getRight(solve(subst,x)),u),u)

integrates it with respect to u, yielding simply exp(u)/2 in this example. This is the result of the integration, expressed in terms of u. Now, |solve(subst,u) subsitutes u with x, yielding the final result, exp(x^2)/2.
As you can see, is not as complicated as it looks. You just need to take each part of the expression, and understand its use. Try to do the same procedure, in the case f(x^2 ln(x^3), u=x^3). You will see that the expression does what it should, and yields the correct answer.

#47 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 10 October 2005 - 05:54 PM

try this:
lim(intg(|x|)/x,x,+infinity)
lim(x/intg(|x|),x,+infinity)
lim(|intg(x)|,x,+infinity)
lim(x/|intg(x)|,x,+infinity)

lim(intg(sin(x)/x,x,+infity)
lim(intg(x/sin(x)),x,+infinity)
lim(intg(x)/x,x,+infinity)
lim(itng(x)/x,x,+infinity)

is it possible to solve this problem with classpad ?
---------------------------------------------------------------------------
Is it possible to define this function in classpad and then plot it?
2 rule function:
f(x)=
1 if x is a member of Q
0 if x is not a member of Q
Q={a/b|a,b member of Z , b <> 0}

#48 fiberoptik

fiberoptik

    Casio Addict

  • Members
  • PipPipPip
  • 70 posts

  • Calculators:
    ClassPad 300, FX-850P, FX-7700G, Voyage 200

Posted 16 October 2005 - 12:47 AM

Hello people, i was going to put this in a new thread, but because it is a CAS related problem i decided to put it here.
This time the problem is with Limits.

I hope you understand the notation. oo is plus infinite.

lim(((4n-3)/(4n+1))^n,n,oo) , the correct result is e^-1, but CP returned 1

lim(n^(n-2)/((n+pi)^n)*(n^2)+1),n,oo) the correct result is e^-pi and CP after a looong time simply returned what i've writen, that is, couldn't evaluate. In this last limit there are some redundant parenthesis, i've written them to avoid possible confusions.

Needless to say that my V200 solved this in a second (literally) and presented the exact answer.

Should i be surprised ? I think not, unfortunatelly CP has got us used to this kind of things.

btw, i still have OS2.00

best regards

fiberoptik

#49 Lovecasio

Lovecasio

    Casio Freak

  • Members
  • PipPipPipPip
  • 242 posts
  • Location:Hochiminh city Vietnam
  • Interests:Organic chemistry.<br />Pharmacy

  • Calculators:
    fx 570 MS, Casio AFX 2.0+, ClassPad 300

Posted 17 October 2005 - 05:29 AM

Hi.
By the way integral(e^(3x)/(e^(2x)+1)) , ClassPad cannot solve.
The CAS is only software, so it can be improved by Saltire. ClassPad has more powerful hardware than Ti (I think) so if CAS is improved, it will be much faster.

#50 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 17 October 2005 - 09:56 PM

Hi.
By the way integral(e^(3x)/(e^(2x)+1)) , ClassPad cannot solve.

This is not exactly true. You can easily solve this integral, but you need to make a substitution first. Use my function called IntgSub for transforming integrals (you can find it in this post). Save the function, then just type, in the "Main" application:
IntgSub(e^(3x)/(e^(2x)+1),e^x=u)
You will get the correct result in about 2 seconds. I know that requiring a tranformation is not very convenient, but at least this integral can be solved in ClassPad...

The CAS is only software, so it can be improved by Saltire.

You are right, the CAS is not shining, especially the indefinite integration. As far as I know, Voyager 200 has a more powerful CAS, but ClassPad's CAS is not so poor, if you know how to use it efficiently. Believe me, it can solve much more problems than one might think at a first glance. But you are right, ClassPad's CAS definitely needs a serious upgrade. I'm not going to wait for this to happen, because I bet that I will wait for a long-long time (probably forever). Instead, I decided to find ways to make the existing CAS more powerful, that's why I started this topic.

PS: Correct me if I'm wrong, but I think that improving the ClassPad OS is Casio's responsibility, not Saltire's.

#51 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 17 October 2005 - 10:27 PM

lim(((4n-3)/(4n+1))^n,n,oo) , the correct result is e^-1, but CP returned 1

Hmmm, your statement is totally wrong :P. ClassPad returns the correct answer, e^-1, almost immediately. You have probably make a mistake when typing this expression in ClassPad. Until now, I have never seen a wrong answer in ClassPad. I have seen unevaluated expressions plenty of times, but not wrong answers...

lim(n^(n-2)/((n+pi)^n)*(n^2)+1),n,oo) the correct result is e^-pi and CP after a looong time simply returned what i've writen, that is, couldn't evaluate. In this last limit there are some redundant parenthesis, i've written them to avoid possible confusions.

You have obviously make a typo here: the left and right parentheses do not match! You probably mean
lim(n^(n-2)/((n+pi)^n)*(n^2+1),n,infinity)
(watch the parentheses), which is equal to e^-pi. Indeed, ClassPad cannot evaluate this limit. I'm trying to find a workaround for this, but it doesn't seem to be an easy task.

Should i be surprised ? I think not, unfortunatelly CP has got us used to this kind of things.

You have absolutely right. You decided to buy another calc to solve this problem, I decided to try to find tricks to make ClassPad's CAS more powerful. This way, I have learned many useful things about Computer Algebra Systems in general. However, I don't really know if I will keep this positive stance forever...

#52 fiberoptik

fiberoptik

    Casio Addict

  • Members
  • PipPipPip
  • 70 posts

  • Calculators:
    ClassPad 300, FX-850P, FX-7700G, Voyage 200

Posted 18 October 2005 - 12:48 AM

Hmmm, your statement is totally wrong :P. ClassPad returns the correct answer, e^-1, almost immediately. You have probably make a mistake when typing this expression in ClassPad. Until now, I have never seen a wrong answer in ClassPad. I have seen unevaluated expressions plenty of times, but not wrong answers...

You are right, i've made a mistake typing the expression. I've raised it to n outside the square brackets that belong to the lim function itself. CP evaluated lim [(4n-3)/(4n+1)] wich is 1, and the raised it to n, wich of course is 1. I've retyped the expression, and justice should be made...

You have absolutely right. You decided to buy another calc to solve this problem, I decided to try to find tricks to make ClassPad's CAS more powerful. This way, I have learned many useful things about Computer Algebra Systems in general. However, I don't really know if I will keep this positive stance forever...

This means that you have deep math knowledge (wich i don't, at least not yet :P). It's only a pitty that your contributions won't be part of the next OS version...
As for the solution to the second limit, i don't know if you did it pencil and paper or not, if not, i can tell you that you should divide n by n+pi , so you can use the known limit : lim (1 + (K / Un)) ^ Un = e^k
I hope that help you find a workaround. I can send you a scan of my textbook if you want.

best regards
fiberoptik

#53 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 18 October 2005 - 09:32 AM

It's only a pitty that your contributions won't be part of the next OS version...

Hmmm, thanks, but I don't think that I can go that far. I'm just trying to make ClassPad's CAS more useful.

As for the solution to the second limit, i don't know if you did it pencil and paper or not, if not, i can tell you that you should divide n by n+pi , so you can use the known limit : lim (1 + (K / Un)) ^ Un = e^k

I tried that, without success. The main problem is that ClassPad is not able to compute lim(n^n/(n+C)^n,n,inf). But I'm not really sure: during my tests, I was often forced to stop calculations due to large computational times. In general, limit calculations in ClassPad seem to be very weak. Still trying, though.

I hope that help you find a workaround. I can send you a scan of my textbook if you want.

Any textbook in Mathematics is welcome ;).

#54 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 27 October 2005 - 11:39 PM

this is not a difficult cas problem but
one of my friends asked me how to sovle these equations .

solve({x^2+y^2=4,x^2-y^2=1},{x,y})

solution :
step 1 :

solve((x^2+y^2=4)|solve(x^2-y^2=1,y),x)	  x=-sqrt(10)/2 ,  x=sqrt(10)/2
solve((x^2+y^2=4)|solve(x^2-y^2=1,x),y)	  y=-sqrt(6)/2   ,  y=sqrt(6)/2
step 2:
now you can plot them to get the results
as you know these are 2 conics , the first one is a circle with r=2
and the second is a hyperbolic

there is no possibility to draw more than 1 Conics at the same time , but there is another solution :
you can draw the alternatives :

x^2+y^2=4 -> y=sqrt(4-x^2) , y=-sqrt(4-x^2)

x^2-y^2=1 -> y=sqrt(x^2-1) , y=-sqrt(x^2-1)

plot them all at the same time in the Graph&Tables you can see 4 intersection as follow :

( x = -sqrt(10)/2 , y = -sqrt(6)/2 )
( x = -sqrt(10)/2 , y = sqrt(6)/2 )
( x = sqrt(10)/2 , y = -sqrt(6)/2 )
( x = sqrt(10)/2 , y = sqrt(6)/2 )


Posted Image

#55 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 28 October 2005 - 08:34 AM

Although it is not mentioned in the manual, it seems that solve cannot be used for solving systems of non-linear equations. Therefore, ClassPad returns
solve({x^2+y^2=4,x^2-y^2=1},{x,y})
unevaluated. unique33's solution to this problem is totally correct, and, in fact, it's the only way to proceed, if using the CAS; this procedure can be even packed to a user-defined function, say "ssolve". However, the CAS solution will have serious problems, if the system is larger than 2x2, or if the equations are more complex than simple conics, since solve will not be able to solve even one equation with respect to one variable. For example, solve is not able to solve the equation
-(x-1)^3+x^2+ln(y)x=0
with respect to x, although there is a solution. In other words, a CAS approach to the problem, even using a step-by-step procedure such as unique33's, has limited use.
I'm planning to add a numerical method to solve systems of non-linear equations in my Lua library "LuaNumAn" very soon. This will solve any kind of non-linear systems without limitations. The drawback is, of course, that such an implementation cannot be used in the CAS for further computations.

#56 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 28 October 2005 - 09:16 PM

try this :
solve(y=10^(x+y),y)

classpad cannot sovle this equation , but do not warry there is no absolute solution for this equation .

here is the maple (9.5) solution :
> solve(y=10^(x+y),y);
		exp(-LambertW(-ln(10) exp(ln(10) x)) + ln(10) x)

which uses the Lambert W function .
and here is the maple Description for this specific function :

LambertW - The Lambert W function

. Calling Sequence
LambertW(x)
LambertW(k, x)

. Parameters
x - algebraic expression
k - algebraic expression, understood to be an integer

. Description
The LambertW function satisfies
LambertW(x) * exp(LambertW(x)) = x .

. As the equation y exp(y) = x has an infinite number of solutions y for each (non-zero) value of x,
LambertW has an infinite number of branches. Exactly one of these branches is analytic at 0.
In Maple this branch is referred to as the principal branch of LambertW, and is denoted by LambertW(x).
The other branches all have a branch point at 0, and these branches are denoted in Maple by LambertW(k, x),
where k is any non-zero integer. (The principal branch can also be referred to as LambertW(0, x)).

. The principal branch and the pair of branches LambertW(-1, x) and LambertW(1, x) share an order 2 branch point at -exp(-1).
The branch cut dividing these branches is the subset of the real line from -infinity to -exp(-1),
and the values of the branches of LambertW on this branch cut are assigned using the rule of counter-clockwise continuity
around the branch point. This means that LambertW(x) is real-valued for x in the range -exp(-1) .. infinity,
while the image of -infinity .. -exp(-1) under LambertW(x) is the curve -y cot(y) + y*I, for y in 0 .. Pi.

. Similarly, the branch corresponding to -1, LambertW(-1, x), is real-valued on the interval -exp(-1) .. 0,
while the image of -infinity .. -exp(-1) under this branch is the curve -y cot(y) + y*I, for y in -Pi .. 0.
For all the branches other than the principal branch, the branch cut dividing them is the negative real axis.
The branches are numbered up and down from the real axis (this is very similar to the way the branches of the logarithm
are indexed by the multiple of 2*Pi*I which must be subtracted from the imaginary part to recover the principal branch).
Again, the values of the branches of LambertW along the branch cut are determined by the rule of counter-clockwise continuity
around the branch point at 0. Thus, the image of the negative real axis under the branch LambertW(k, x) is the curve -y cot(y) + y*I,
for y in 2*k*Pi .. (2*k + 1)*Pi if k > 0 and y in (2*k + 1)*Pi .. (2*k + 2)*Pi if k < -1. These curves, therefore,
bound the ranges of the branches of LambertW, and in each case, the upper boundary of the region is included in
the range of the corresponding branch.

. The asymptotic behavior of LambertW at complex infinity and at 0 (for the non-principal branches) is given by

LambertW(k,x) ~ log(k,x) - log(log(k,x)) +
sum(c(m,n)*log(log(k,x))^(m+1)/log(k,x)^(m+n+1), 0 <= m,n <= infinity)

where log(x) denotes the principal branch of the logarithm, log(k, x) = log(x) + 2*k*Pi*I and the c(m, n) are constants independent of k.
The expansion for LambertW(-1, x) is not valid for x tending to 0 along the negative real axis (the effect of the branch point at -exp(-1) must be considered),
but holds otherwise.

. The LambertW function is closely related to the tree generating function T(x) popularized in the analysis of algorithms discipline.
When T[n] counts the number of distinct oriented trees with n labelled vertices and T(x) = sum( T[n]*x^n/n!, n=1..infinity),
then T(x) = -LambertW(-x).

. Reference: R.M. Corless, G.H. Gonnet, D.E.G. Hare, D.J. Jeffrey, and D.E. Knuth. "On The Lambert W Function".
Advances in Computational Mathematics 5 (1996): 329-359.

#57 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 29 October 2005 - 12:45 PM

try this :

solve(y=10^(x+y),y)
classpad cannot sovle this equation , but do not warry there is no absolute solution for this equation . Here is the maple (9.5) solution :
> solve(y=10^(x+y),y);
		exp(-LambertW(-ln(10) exp(ln(10) x)) + ln(10) x)
which uses the Lambert W function .

This equation cannot be solved by the solve function, and, unfortunately, I cannot see any way to overpass this problem by using the CAS itself. Since it is clearly a difficult problem, I don't think that we should be complaining for that. However, this doesn't means that it cannot be solved in ClassPad numerically. Of course, since the solution has an infinite number of branches, we cannot expect to compute all of them, but at least we can find as many as we want. This was a quite challenging numerical problem. However, the problem can be solved flawlessly using my LuaNumAn library :greengrin:. Here is the output of a Lua program that solves the equation for 21 values of x from x=-6 to x=-2, and the corresponding graphs for the solutions obtained:
Posted ImagePosted ImagePosted Image
The graphs show two solutions, y1(x) and y2(x). I have checked the solutions using a Mathematica program, and they are totally correct B).
The Lua program that solves the problem is somewhat larger than one screen; it could be considerably shorter without plotting facilities. The program basically uses my "Krone" library, and needs about 15 seconds to be executed, which is a decent computation time, considering that it is running on a calculator.
If you need the Lua program that solves the problem, here it is. If you have any questions on how the program works, here I am.

#58 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 02 November 2005 - 09:23 PM

A simple laplace transform function :

Define library\Laplace(m,b,y,d)=

piecewise(y=x^n,1/(s^(n+1))*(-1)^n*n!,
piecewise(m=0,((lim(integ(collect(exp(-s*x)*y),x,0,h)|(s-a)>0|(s-a)=abs(s-a)|(a-s)<0
|(a-s)=-abs(a-s)|s>0|s=abs(s),h,inf)|s>0|abs(s-a)=(s-a)|abs(a-s)=(s-a)|a=d)|s=f|f=(s-b),
diff(-((lim(integ(collect(exp(-s*x)*y),x,0,h)|(s-a)>0|(s-a)=abs(s-a)|(a-s)<0
|(a-s)=-abs(a-s)|s>0|s=abs(s),h,inf)|s>0|abs(s-a)=(s-a)|abs(a-s)=(s-a))|a=d)|s=f|f=(s-b),s,m)))

use this function in the following form :
x^n*exp(b*x)*f(a*x)  -> Laplace(n,b,f(a*x),a)


examples:
x^2*exp(3*x)*sin(a*x)	->	   Laplace(2,3,sin(a*x),a)

cos(a*x)						  ->	   Laplace(0,0,cos(a*x),a)

cos(2*x)						  ->	   Laplace(0,0,cos(a*x),2)

Posted Image Posted Image

A procedure to find the Inverse Laplace Transform of a fraction :

Posted Image Posted Image Posted Image Posted Image

#59 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 02 November 2005 - 09:57 PM

If you need the Lua program that solves the problem, here it is. If you have any questions on how the program works, here I am.


thanks. :)

#60 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 03 November 2005 - 07:34 PM

Use If istead of piecewise with PRGM Conv. It runs faster.

#61 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 03 November 2005 - 09:06 PM

Use If istead of piecewise with PRGM Conv. It runs faster.


I saw your add-in before , but I do not know how to use .
If you have the time can you convert it ?
then we can Improve this function.

#62 unique33

unique33

    Casio Freak

  • Possibly hacked
  • PipPipPipPip
  • 229 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    classpad 300 , fx5500

Posted 05 November 2005 - 03:11 AM

plot a function from -infinity to + infinity

you can use tan-1 which transforms -infinity .. +infinity to -pi/2 .. pi/2

tan-1( f(x)|x=tan(x))
plot it for
x=(-pi/2+.001) .. (pi/2-.001)
y=(-pi/2) .. (pi/2)
-----------------------------------------------------------------------------------------------------

try this:
lim(intg(|x|)/x,x,+infinity)
lim(x/intg(|x|),x,+infinity)
lim(|intg(x)|,x,+infinity)
lim(x/|intg(x)|,x,+infinity)

lim(intg(sin(x)/x,x,+infity)
lim(intg(x/sin(x)),x,+infinity)
lim(intg(x)/x,x,+infinity)
lim(itng(x)/x,x,+infinity)

is it possible to solve this problem with classpad ?
---------------------------------------------------------------------------


yeah .It can be sovled graphically!
the parallel lines are
y=1
y=-1

>example

plot intg(|x|)/x from - infinity to + infinity
y=tan-1( intg(|x|)/x|x=tan(x))
y=tan-1(1|x=tan(x))
y=tan-1(-1|x=tan(x))

lim(intg(|x|)/x,x,+infinity)
Posted Image


lim(x/intg(|x|),x,+infinity)
Posted Image


lim(x/|intg(x)|,x,+infinity)
Posted Image

lim(intg(sin(x)/x,x,+infity)
Posted Image


lim(intg(x/sin(x)),x,+infinity)
Posted Image

#63 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 05 November 2005 - 11:35 AM

plot a function from -infinity to + infinity
you can use tan-1 which transforms -infinity .. +infinity to -pi/2 .. pi/2

Nice remark. I tried your transformation with your example functions 8*cos(x)-x and 1/x^4-3+x^2, and it really works; I got a graph similar to the Maple graphs you have posted in the "Lua Graph" topic. However, I'm afraid that infinity graphs will not be accurate enough in any case, because {-infinity,infinity} is "streched" to {-pi/2,pi/2}; this means that curve changes at a small x-interval will be lost in transformation. Nevertheless, I agree that such a graph will be useful to get an idea on how the function f(x) goes. As you said, this transformation attempts to plot the function from -infinity to infinity. It isn't robust, but it's useful.
Maybe you are right, it is a good idea to modify the LuaPlot function "PlotFunc", so that it will be able to plot infinity graphs. This will need to call the CAS in CPLua, but it doesn't seems to be difficult to implement. I'll let you know about my progress. Thanks!

#64 golpesar

golpesar

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 08 November 2005 - 01:33 PM

Dear Friends,
1. whould you please enter this code in your class pad 300 and let me know if it is solved successfully!
solve(log(x)-ln(x)+tan(x)=x, x)

Please do it with solve command and numerical solver!
We know that this equation has several roots! for example 4.62, 7.??, ... but solve can not solve it until you specify as:
solve(log(x)-ln(x)+tan(x)=x, x, 4.5)

2. consider the function f(x, y) = (x^2+y^2)/(x^2-y^2), as we know this function has no limit in (0,0) now enter the following code:
lim(lim((x^2+y^2)/(x^2-y^2), x, 0), y, 0), you will get (1) and now:
lim(lim((x^2+y^2)/(x^2-y^2), y, 0), x, 0), you will get (-1)
therefor in such cases you MUST do all sequences to get the correct answer, if f= f(x, y, z) and p0(0, 0, 0)
you must use several codes to indicate the there is a limit or not. Can Ti-89 solve this example only with one code?

3. the above function has discontinuity for y=+ and y=-x, what is the behavior of CP300 and TI-89 in the follwing case:
integrate(integrate((x^2+y^2)/(x^2-y^2), x, 0, 1), y, 0, 1)


I have an other question! please excuse me if it is not related to this topic, but is very simple: I use 4 AAA rechargable batteries, every time after I charge them and use in CP 300, my battery icon shows full state only for a few minutes and after that it shows 2 of 3 (in battery icon), what is your viewpoint, is there any short connection that results to battery decharching


Thanks and regards

#65 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 09 November 2005 - 10:40 AM

Wow, I have many things to say, but I'll try to be short:

1. whould you please enter this code in your class pad 300 and let me know if it is solved successfully!
solve(log(x)-ln(x)+tan(x)=x,x)
Please do it with solve command and numerical solver!
We know that this equation has several roots! for example 4.62, 7.??, ... but solve can not solve it until you specify as:
solve(log(x)-ln(x)+tan(x)=x, x, 4.5)

This equation cannot be solved analytically, i.e.,
solve(log(x)-ln(x)+tan(x)=x,x)
gives no answer. Even Mathematica cannot solve it, so we shouldn't be complaining. However, it can be solved numerically: the built-in function solve can get a third argument:
solve(expression,variable,guess)
where guess is an "initial guess" for the root. So,
solve(log(x)-ln(x)+tan(x)=x,x,4.5)
gives a root because solve has a third argument, equal 4.5, and this means that ClassPad tries to solve the equation numerically, using x=4.5 as an initial guess for the root. The manual explains this behavior, although it is not very informative.
Internally, it seems that ClassPad uses the well-known Newton-Raphson method to compute the root numerically. Newton-Raphson is fast, and it's the most popular root-finding method, but it has a main disadvantage: it needs an initial guess, and this guess should not be selected arbitrarily. If you select the initial guess blindly, ClassPad may fail to compute the root, or it may give a root too far from your initial guess. This is not a bug: it's due to the functionality of the Newton-Raphson method
Now, how can we compute several roots? This is rather easy, provided that you know what you are doing:
(1) Plot the function log(x)-ln(x)+tan(x)-x from x=0 to x=11. Use "Settings->Setup->Graph Format" to set the axes on. Use proper values for ymin and ymax (in this example, you will get a nice graph by using ymin=-12 and ymax=4). You will see that this function has many discontinuities. You will also see that there are three roots in the interval [0,11].
(2) Use "Analysis->Trace" to get a raw estimate for each root. This estimation needs not to be accurate: the crucial point is that the tangent at the root estimation crosses the x-axis near the root you want. You can also use "Analysis->Scetch->Tangent" to plot the tangent at a point. Using this procedure, you will see that x=4.2, x=7.4, and x=10.6 are good initial guesses for the roots. You can also see that x=2.76 is a very bad initial guess (plot the tangent at this point to see why).
(3) Use solve to get the roots, giving the initial guesses you have found, i.e.:
solve(log(x)-ln(x)+tan(x)=x,x,4.2)
solve(log(x)-ln(x)+tan(x)=x,x,7.4)
solve(log(x)-ln(x)+tan(x)=x,x,10.6)
You will get the three roots almost instantly. To see the effect of a bad initial guess, try
solve(log(x)-ln(x)+tan(x)=x,x,2.76)
You will need to wait for several minutes, then you will see that ClassPad fails to compute any root.
Remarks:
(1) The procedure explained before is useful for practical purposes. However, if you want to know more on how "solve" works, you need to read any good book on Numerical Analysis to see how the Newton-Raphson method works.
(2) Of course, you can use "Analysis->GSolve->Root" to get a graphical solution. The results obtained this way are accurate enough.
(3) The "NumSolve" application has a similar funtionality, but it needs a x-interval, besides the inital guess. For that reason, I think that using the solve function is much more convenient.
(4) If there are no discontinuities within your x-interval, you can also use my LuaNumAn library to obtain all the roots with less effort. However, you need to know the Lua programming language for this.

2. consider the function f(x, y) = (x^2+y^2)/(x^2-y^2), as we know this function has no limit in (0,0) now enter the following code:
lim(lim((x^2+y^2)/(x^2-y^2), x, 0), y, 0), you will get (1) and now:
lim(lim((x^2+y^2)/(x^2-y^2), y, 0), x, 0), you will get (-1)
therefor in such cases you MUST do all sequences to get the correct answer, if f= f(x, y, z) and p0(0, 0, 0)
you must use several codes to indicate the there is a limit or not.

Well, finding multidimensional limits is not an easy task for every CAS. In genenal, you can prove that a function is not continuous at a given point (x,y) by finding two different liimits when approaching the point by two different paths. This is exactly what you have done in your example. Finding the appropriate paths for this may be extremely difficult. There are some guidelines, but they only apply to specific kinds of functions, and they are not general. Conclusion: yes, you must use several codes to prove that there is a limit or not.

3. the above function has discontinuity for y=+ and y=-x, what is the behavior of CP300 and TI-89 in the follwing case:
integrate(integrate((x^2+y^2)/(x^2-y^2), x, 0, 1), y, 0, 1)

Hmmm, why don't you try it in your ClassPad? You will see that there is no real result, and this is totally correct. This integral does not converge. I don't have TI89 or V200, so I cannot say what answer they give.

#66 golpesar

golpesar

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 09 November 2005 - 12:44 PM

Dear PAP,
Thank you for your attention.
1. Considering root finder methods and limit calculations, I wanted to know the power of CP 300 in comparson with TI-89 or any other alternative.

2. Regarding the integral, I wanted to know that how many time is required (approximately) in such cases, if the user is giving a function blindly in CP 300 and Other Calculators.

3. I had an other question in my post related to battery usage of CP 300 (Please excuse me if is not related to this topic), whould you please give me some information about the battery usage of this unit (in standard uses)

4. Now consider the following code:
diff(y''+y'-2y=0, x, y)
In CP 300 you will be informed about the answer immediately
Now change it as:
diff(y''+y'+2y=0, x, y) or diff(y''+y'+y=0, x, y)
It takes many seconds (you can do it yourself) and finally I was tired! you can use the following equivalent code:
diff({z'+z+2y=0, y'=z}, x, {y, z}) or diff({z'+z+y=0, y'=z}, x, {y, z}) but again I was tired, waiting for the result. Any one knows the performance of TI89 and the others?

Again many thanks for your attention and kindness

#67 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 26 November 2005 - 01:44 PM

Spreadsheet
----------------
I know, I can use a lot of functions in formulas, but I have still one problem.. How can I convert string to expression?
I would like to make formula e.g. =Intg(B3,x,C3,D3,.0001) But this returns error, text from B3 is treaten as a text not expression. How to omit this problem?

#68 SoftCalc

SoftCalc

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 406 posts
  • Location:Portland, OR USA

  • Calculators:
    ClassPad 300 , AFX 2.0, HP-48/49/50, TI-89/92/Voyager, HP Expander, etc...

Posted 26 November 2005 - 05:31 PM

Spreadsheet
----------------
I know, I can use a lot of functions in formulas, but I have still one problem.. How can I convert string to expression?
I would like to make formula e.g. =Intg(B3,x,C3,D3,.0001) But this returns error, text from B3 is treated as a text not expression. How to omit this problem?

You need to tell the spreadsheet that B3, C3 and D3 are math expressions and not text. You can do this in two ways.
  • Put an "=" in the front and enter them in as formulas.
  • The better solution is to simply click the format button (I think it's the 3rd from the left) to change the cell format from text to expression.


#69 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 26 November 2005 - 07:21 PM

How can I get access to coefficients calculated using e.g. CubicReg ???? I mean coefficients as variables, becouse I need to use then later.

#70 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 26 November 2005 - 07:36 PM

How can I get access to coefficients calculated using e.g. CubicReg ???? I mean coefficients as variables, becouse I need to use then later.


Cat ---> Form-SYS ---> aCoef, bCoef, cCoef , dCoef

#71 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 28 November 2005 - 02:02 PM

Hello!
I need to find minimum of 4 variable function. Can I do it with Classpad?

#72 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 28 November 2005 - 06:13 PM

I need to find minimum of 4 variable function. Can I do it with Classpad?

Not at the moment, but you will be able to do so soon.
ClassPad has the very powerful built-in function "fMin", which is able to find all the minimums of a function of one variable. This function is very robust (I have found an example where "fMin" fails, but I tried hard to find it).
However, minimizing a function of many variables is a difficult problem, as you certainly know. You cannot solve this problem with ClassPad's built-in functions. However, there are numerical methods for finding the roots of a function of many variables; these methods can also be used to obtain a minimum. Actually, I have already added such a method in LuaNumAn 1.50. Since I haven't released this version yet, you can send me the exact problem you want to solve, then I can post ClassPad screenshots showing the results (this way I will perform another test to my code ;)). I can also send you a temporary LuaNumAn version able to solve your problem, but I'm not sure it is a good idea; temporary versions are a nightmare for both the developer and the user.

#73 -Tom-

-Tom-

    Casio Freak

  • Members
  • PipPipPipPip
  • 104 posts
  • Location:Poland
  • Interests:Tides, Celestial Navigation, Deadreckoning

  • Calculators:
    Cla$$pad 300

Posted 28 November 2005 - 06:25 PM

Thank You PAP! :)
I think I will wait. When 1.5 is expected??? I cannot wait to check new possibilities!
I think I will not share my problem now... my friend says that I find my self problems, I must just check something. Thanks again!

#74 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 28 November 2005 - 06:44 PM

When 1.5 is expected???

I really don't know. The code is already written, but I need to perform extensive tests before releasing the new version. I also need to write the documentation for the new features. I estimate that this will take at least 6 fully-working days; unfortunately, this means "at least 3 weekends" :(. As you may know, testing a program needs much more time that the time needed to write it. That's why I have proposed to post the solution of your specific problem. Anyway, I think that version 1.50 will "certainly" released before Christmas.

I cannot wait to check new possibilities!

Thanks! You can imagine how nice is to see that LuaNumAn is useful to other people :).


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users