Giulianot

25 Reputation

2 Badges

9 years, 2 days

MaplePrimes Activity


These are replies submitted by Giulianot

@tomleslie but it doesn't works because there is not any numeric table of function saved internally by maple. if i want to maximize a numeric DE solution, maple can do it because there is a matrix with different values of argument and values for that argument, that's because maple solved it and saved a matrix with solution. But in this case maple has not any matrix to work with, so can't maximize distancia(theta), can't even return the value of theta for an specific distance, which it can perfectly do with a DE solution.  

@tomleslie i finally decided for the first option, but now i noticed i need to express that matrix from the plot data like a procedure to finally call it like a numeric function, just like you can do it from a numeric DE solution. Do you know how should/could i do it?

@tomleslie  Ohh sorry i know what you are refering too, but although it is hard to believe, it's true. The sqrt term there, is referring to the velocity magnitude, the absolute speed of body relative to the air, and it depends of velocity on y too, those are the equations, they give you a logic result like i said, and for high speed problems we can perfectly ignore the linear velocity term, even more if the fluid is a gas. I did the same mistake at the beginning too, but later noticed i was wrong because of results were non sense. Now, can you please help me to generate that numeric equation table please? It's only for that last function i called distancia(theta).

@tomleslie i almost have achieved it, but still need to create an equation numeric table like which is generated when a diff equation is solved by the program internally. im going to attach my maple file so you can see how i solved it. the last equation i called distancia, doesn´t has a numeric table internally generated, like y(t) or x(t) have, however i could plot it, cause the function generate outputs perfectly well, although it takes a while to plot. the names of certain functions are on spanish cause it´s my natal languague,so sorry about that. i think i did a great job and can be usefull for any other person who wants to manipulate a numeric solution. thanks any way for your help!!

sol := proc (theta) options operator, arrow; dsolve({diff(x(t), t, t) = -(1/200)*(diff(x(t), t))*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2), diff(y(t), t, t) = -(1/200)*(diff(y(t), t))*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2)-9.8, x(0) = 0, y(0) = 0, (D(x))(0) = 315*cos(theta), (D(y))(0) = 315*sin(theta)}, numeric, output = listprocedure) end proc

proc (theta) options operator, arrow; dsolve({diff(x(t), t, t) = -(1/200)*(diff(x(t), t))*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2), diff(y(t), t, t) = -(1/200)*(diff(y(t), t))*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2)-9.8, x(0) = 0, y(0) = 0, (D(x))(0) = 315*cos(theta), (D(y))(0) = 315*sin(theta)}, numeric, output = listprocedure) end proc

(1)

yprueba := proc (theta) options operator, arrow; rhs(sol(theta)[4]) end proc

proc (theta) options operator, arrow; rhs(sol(theta)[4]) end proc

(2)

tiempo := proc (theta) options operator, arrow; fsolve((yprueba(theta))(t) = 0, t, avoid = {t = 0}) end proc

proc (theta) options operator, arrow; fsolve((yprueba(theta))(t) = 0, t, avoid = {t = 0}) end proc

(3)

tiempo((1/9)*Pi)

8.196910332

(4)

tiempo((1/2)*Pi)

18.48323150

(5)

tiempo(0)

fsolve(`y(t)`(t) = 0, t, avoid = {t = 0})

(6)

tiempo((1/9)*Pi)

8.196910332

(7)

tiempo((1/4)*Pi)

13.78910108

(8)

tiempo((1/60)*Pi)

2.191408881

(9)

xprueba := proc (theta) options operator, arrow; rhs(sol(theta)[2]) end proc

proc (theta) options operator, arrow; rhs(sol(theta)[2]) end proc

(10)

distancia := proc (theta) options operator, arrow; (xprueba(theta))(tiempo(theta)) end proc

proc (theta) options operator, arrow; (xprueba(theta))(tiempo(theta)) end proc

(11)

NULL

plot(distancia, 0 .. (1/2)*Pi)

 

``

``


Download proyectil.mwproyectil.mw

   

@tomleslie  in fact, i never said x was an horizontal position, and y a vertical height, i just was trying to typing as short and fast as possible. Obviously they had to be velocities for the problem to have any sense, like you said.

Ok, you got my point. How can i solve it then? There's a way to solve it with maple without getting into programation and scripts, like on matlab? Doesn't maple 2015 have an option to solve a numerical problem like this, or similar others? 

@Kitonum  thanks man, but im looking for something more. Should be a way to stablish conditions on a numerical solution such a way that allow us to solve the problem i got here, and many others. We should be able to manimulate those conditions to obtain an specific answer. Im not talking about the initial conditions only, rather certain relations between the various ecuations we got on solution, like i planted on my problem.

hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Also always i try to solve that strange ecuation maple give me like an aswer in terms of Z, with an integral on it, i don't get nothing. I evaluate a point with right click, evaluate a point. Choose the variables value, and the time at wich i want to evaluate the ecuation. Later it give me the same strange solution but with the variables replaced for the values i gave to the program. Then i choose right click, aproximate, and don't matter if i select 5, 10 or more digits, it launchs to me the same strange ecuation, not the number i'm waiting for.

So that i want to know now is how can i manipulate a numerical solution to a diff ecuation.

For example if i got this system of diff ecuation

dx/dt = (-k/m) (x srqt(x^2 + y^2))

dy/dt = (-k/m) (y srqt(x^2 + y^2)) - g

Which is a projectile trajectory taking care of air drag force, and i want to know at which initial speed i have to fire the body to reach 300m if it is fired from the initial point at (0,0), and it's initial velocity on x is 3 times it's initial velocity on y (initial launch angle condition)? 

How can i input that conditions to make maple give me a solution for something like that?

@Thomas Richard  not really, because someone solved it on polar coordinates. And got a beauty and simple solution, i think it was the best way to solve it. Anyways thank you for your help and your attempt, appreciate :)

@vv  not numeric ode

@vv i would prefer to avoid that kind of answer. It's not clear to me an answer like that. I prefer something without strange Z's and without y in finction to x, because i want it in function of time.

@Thomas Richard  im on my tablet and i could get a zoom on it. Don't know if you tried yet...

@Kitonum  well, maple didn't solve it on cartesian but a solution is a solution, i like the way you got the problem. By the way, i have not idea how did you simplified the big system to the small one, did you use maple? How can i tell to maple to transform a system like this, which isn't expressed like a vector, to polar coordinates, or from polar coordinates to cartesian, like you did it at the end. Every of this questions if you used maple to get those answers. Thanks again for your help! 

@Carl Love  in the first ecuation, maple really didn't solve the ecuation, i need the function x(t) which fits in that ecuation. I can't see the answer like x(t)= .... 

In the system case, when i solved it on wolfram, i got a real answer in terms of k, m and t, something like an square root, with real numbers. Also i can see you haven't noticed the term -k/m in front of my diff ecuation system. I really can't understand that answer which maple gave to me, it has an integral on it, and i don't even know what the Z means. Also y(t) is in terms of x(t), not in terms of t especiffically.

So i have attached an image, i think it's clear to see on it what i mean.. 

1 2 3 Page 3 of 3