The function

85 Reputation

3 Badges

0 years, 269 days

MaplePrimes Activity


These are replies submitted by The function

@acer 

You answer looks something similar to what my mathbook states the following (its in Dutch but if you only read the code you will get what is happening: 
 

But i want to know if there is any way to simplify the really long answer because that is what i am looking for. Not working around the long answer by making a more smart way to do the calculations. 

Thanks everybody! 

I could figure the answers out while they were not too difficult. But i just had to get my right on that -3 answer. And you agreed. So i am happy with that. 

But is there a way that the answer could have been 3 instead?

Greetings,

The Function 

@Mac Dude @mmcdara

So the book is indeed wrong. Well that is what i was saying, but i found it so odd they would add a wrong answer in the book. 

I am glad you can confirm my assumption. 

Greetings,

The function. 

@acer 

I would have to look up those done by hand. I did those a couple of years ago. 

I did get the ?implicitdiff opened up, and tried it like that. It gave me the right answers that i was looking for. If i remember correctly, i could make it like the solutions in the book. 

The important part for me is that im learning how to use maple and that i get the right results. 

Greetings,,

The Function

@acer 

Yes i did that right away, to check the "?implicitdiff". I did not know about the cross reference. I should have checked the diff in the first place. But i did not think about it. With the "see also", you could check it, but what is the chance of that it is what i am looking for, while maple is that big a program, with so many functions. So i went to mapleprimes to see if anyone has seen a problem like ive had before. That would speed things up, and keep my mind at ease. Time passing by without much progress, i cant stand it. So many books that i will have to finish, and i do need to get through Maple to get them done faster. So not too much wasted time in the long run. :) For today my homework yield was not to great either, i also had to paint in the house. I want to finish at least 2 sections of the math book a day. It really reminds me of me as a starter at solidworks, and time flying by not finishing anything big. But now i can shape about anything. 

I hope that i will be as good at this program as you are, while that would get me where i would want to be. 

Greetings,

The Function. 

@acer 

Thank you for the quick reply. This really helps a lot! I was really wondering how to go about this problem, and there had to be a way. Its a shame the book did not give me these ways to do it. It would have helped a lot. Its like rowing a boat with one oar, while you need two.

Any ways, i will try it out now! 

Greetings,

The Function

@one man 

Are you sure that is what they mean? I have to fill in a value for the voltage myself? Because that actually does make sense, how would U be in the name and in the function at the same time? 

It really explains it all. They could have pointed that out in the text. 

Thank you! 

Greetings, 

The Function

@acer 
Okey, so diffrent beast we can throw at it. I will make sure that i note all the different kinds down so i have the best chance of succeeding. 

The thing i meant was: Cant they get the code from these calculators, see how it functions, and just use pieces of code for maple to make it run better. Copying a good piece of code is better than coming up with something that performs less. Of course i dont know what type of calculation is being let loose on the equation. 

How maple functions really reminds me of Arduino, and the Arduino approach is always getting a piece of code from other Arduino applications, chop all the pieces you need out, and then implement it in your own piece of code. Now this is a bit "dirty", and you want to actually know how it functions, and wright your own code. But having a peek under the hood of these calculators may be valueable. 

Greetings,

The Function

@acer
So it is what it thought it was a piece of code that prohibbits the machine to finding a solution. So maybe the Texas instruments and Casio graphic calculator might have some better efficient code in it so that it does work. I however do like the maple environment while it can do a lot. But having to work around these "bugs" is a bit cumbersome. 

Maybe if Maple gecomes as mainstream as students and technicians buying Texas instruments and Casio calculators there is enough capital to get it right...(????) I dont know, but when i was doing studying back in the day Maple was unattainable for most of us. We could not find our way into buying the "cheap" version, or it was not there. The one guy that did pay the price got the best grades. Finished all his homework way before the deadline. And we were struggling with the graphic calculators... Maybe making it more cheap and selling more copies might bring in more money while it is more attainable. Or making it more accesable by getting more contact between universities and maple, or maybe give a large number of copies bought discount. It should be foolproof so that everybody that starts as a freshman gets a copy of Maple. That should bring in more money, and thus creating better quality of the program. A win, win, win.. situation.. :) 

@acer @vv @tomleslie

Any way the one solution i thought would be the final solution, was not the final solution after all... Yes its a shame, but it is good that i plotted the graph so i could see the flaw. It missed the 2nd answer. :( I will try the other methods now and see if there is a working one. 

Just showing that what looks like the solution that would find everything, may not give all the answers everytime. 

expr := tan((1/2)*Pi-x)-4.6785; ans1 := [fsolve(expr, x = 0 .. 2*Pi, maxsols = 10)]; indentify(%)

cot(x)-4.6785

 

[.2105750775, 6.493760384]

 

indentify([.2105750775, 6.493760384])

(1)

smartplot(tan((1/2)*Pi-x), 4.6785)

 

``

Download Question_for_maple_primes_3.mw

Greetings,

the function

@acer @tomleslie @vv
Thank you for all the solutions given. There is a great veriety of solutions with bigger or smaller succes rates. 

I think the answer: 

ans1 := [fsolve(expr, x=0..2*Pi, maxsols=10)];

Is the straightest answer. Only time will tell if this solution is up for all the jobs im going to throw at it. 

Why my code: evalf(solve({sin(x) = cos(4*x - 1/6*Pi), x < 2*Pi, 0*Pi < x}, x, allsolutions, explicit)) did not give all the answers is a mistery to me. It should have given all the results as ans1 piece of code but it did not.. Is this a bug? Is this something that has got to be fixed? Or is it that there are so many ways to go about a problem some ways work and others simply do not because the commands are not programmed right. I really get that Maple is really hard to get right while it is fast, its huge, is such a big thing.. Its a monster.. :) What do you think, is this something that should have worked? It did say:"allsolutions". 

Thank you!

Greetings,

The Function.

@tomleslie 

Is there some function you did turn on or off in the worksheet you showed? The code is not working in a new worksheet. 
 

restart;
with(RootFinding);
sols := [];
tmp := 0;
do
    tmp := NextZero*(x -> sin(x) - cos(4*x - 1/6*Pi), tmp);
    if tmp <= evalf(2*Pi) then
        sols := [sols[], tmp];
    else
        break;
    end if;
end do;
sols;

[Analytic, AnalyticZerosFound, BivariatePolynomial, EnclosingBox, HasRealRoots, Homotopy, Isolate, NextZero, Parametric, WitnessPoints]

 

[]

 

0

 

RootFinding:-NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, 0)

 

Error, cannot determine if this expression is true or false: RootFinding:-NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, 0) <= 6.283185308

 

[]

(1)

restart; with(RootFinding); sols := []; tmp := 0; do tmp := NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, tmp); if tmp <= evalf(2*Pi) then sols := [sols[], tmp] else break end if end do; sols

Error, cannot determine if this expression is true or false: RootFinding:-NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, 0) <= 6.283185308

 

[]

(2)

``


 

Download Question_for_maple_primes_2.mw

@tomleslie 

So i tried to copy paste this piece of code to my worksheet. Well, i got some unexpected results. 

While i thought with "restart" the sheet world be blank for working the code. Well this was not really true while it showed only the solution i found before, and then it showed no solution at all. When it was in the brown red letters again, it however worked out.. So strange. I dont know why that is. 


 

  restart;
  with(RootFinding):
  sols:= []:
  tmp:=0:
  while true do
        tmp:= NextZero
              (  x -> sin(x)-cos(4*x - 1/6*Pi),
                 tmp
              );
        if   tmp <= evalf(2*Pi) then
             sols:= [sols[], tmp];
        else break;
        fi:
  end do:
  sols;

[.4188790204, 1.675516081, 1.745329251, 2.932153143, 3.839724354, 4.188790204, 5.445427266, 5.934119456]

(1)

restart; with(RootFinding); sols := []; tmp := 0; do tmp := NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, tmp); if tmp <= evalf(2*Pi) then sols := [sols[], tmp] else break end if end do; sols

{x = 4.188790204}, {x = 5.445427267}

(2)

restart; with(RootFinding); sols := []; tmp := 0; do tmp := NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, tmp); if tmp <= evalf(2*Pi) then sols := [sols[], tmp] else break end if end do; sols

Error, cannot determine if this expression is true or false: RootFinding:-NextZero*(proc (x) options operator, arrow; sin(x)-cos(4*x-(1/6)*Pi) end proc, 0) <= 6.283185308

 

[]

(3)

  restart;
  with(RootFinding):
  sols:= []:
  tmp:=0:
  while true do
        tmp:= NextZero
              (  x -> sin(x)-cos(4*x - 1/6*Pi),
                 tmp
              );
        if   tmp <= evalf(2*Pi) then
             sols:= [sols[], tmp];
        else break;
        fi:
  end do:
  sols;

[.4188790204, 1.675516081, 1.745329251, 2.932153143, 3.839724354, 4.188790204, 5.445427266, 5.934119456]

(4)

``


 

Download Question_for_maple_primes_1.mw

@tomleslie 

This means a lot to me, thank you!

Greetings,

 

 

The Function

@tomleslie 

Well, i thought you wanted to know where i am coming from. 

I dont get what you are laughing at. Better not do that in real life to people, some dont take it lightly you know. 

Let me tell you, it feels like a ripoff what you typed there. 

Are the questions answered bricks in your wall? It is just a piece of mind. I think it is nice that you gave some good answers, but im not a McDonalds drive through. 

Greetings,

The Function

@tomleslie 

As ive noted before in another post. I already made this book with pen and paper. So im going through this for the 2nd or 3rd time.

It is not that i dont want to think. It is that i am trying to understand how maple works.

I want to try a slide rule one day. But then i need to buy one, and i am not that wealthy yet that i can buy things i dont really need right now.

But you are right, of course you cant to know how to diffentiate and how to do integrations, trigonometry, etc. etc. I am not trying to act smart. Really i am not. Its just some of these study books (and i did a lot of those, especially on some trade jobs like carpentry, plumbing, welding, etc. you name it..a lot) you get a reportoir. Like in the other post, this one probably portrays you as some smart pants know all. What can i do about that? No clue.. Just keep going i guess.

Any way, thank you for the concerns!

That book i refered to is just so you may have something that does give thrill. Maybe it gives an edge to really long range shooting. Its something all ages can partake in. I also did some studying on how barrels are made and ammo casings. From a rod of metal, and a flat piece of brass to a barrel and a casing. Really cool. But in the end, no matter if its concrete engineering, or objects in flight or calculations on tunnels or any thing involving math. If i want to make sense of it all, and also want to deliver the information to other people, it is Maple that a really have to know how to use. So its back  to that old book, and now do it with Maple untill practice makes something that produces A quality answers. So then maybe i can draw up what i know into 3d CAD models, and then make it into something real. I know i can do it. Got all the other things i wanted to get done, done too. I can now, build a house, wire it, plumb it, make the concrete forms, make brick walls, do the wood framing and make a machineshop and know how to man it, in the span of a year. 9 books in total. I think that was rather good. But it is a whole different mindset. With all the math and engineering books coming up. Any way, it is good to see the world from diffrent perspectives too. 

I dont know what i did that made you people think that i dont value the knowledge of math. But doing it with the computer is definitely something that is of the 21st century. I dont feel like going back to paper just to compute my formula piece by piece, with a lot of manual labor. And then make a mess on paper if i mess up. It just takes to long. Also, if your input is rubish, the output will he rubish too. So it still depends on what you put into Maple to make it work.

Greetings,

the function

1 2 3 Page 2 of 3