max125

175 Reputation

8 Badges

9 years, 126 days

MaplePrimes Activity


These are questions asked by max125

Is there something wrong with dsolve?

ode := diff(y(x), x) = sqrt(2*32.2*y(x)):
ics := y(0) = 0:
dsolve({ics, ode});

maple output:   y(x) = 0

The answer should be

y(x) = 16.1 x^2

Wolfram got it

 

I tried using restart, with(DEtools), still no luck. Though I don't think its necessary to call with(DEtools) for this simple equation.

To make the problem simpler, use dsolve on  dy/dx = √y , y(0)=0.

ode := diff(y(x), x) = sqrt(y(x)):
ics := y(0) = 0:
dsolve({ics, ode});

maple returns  y(x) = 0, which is incorrect.  Should be y(x) = x^2/4

I uploaded the worksheet just in case 'its just me'.

diffeqseperable.mw

I have a trigonometric equation that outputs with a solution in terms of _B1 which I want to remove.

restart: solve({7*cos(2*t)=7*cos(t)^2-5, t>=0, t<=2*Pi}, t, allsolutions, explicit);

output:

{t = arccos((1/7)*sqrt(14))},

{t = 2*Pi-arccos((1/7)*sqrt(14))},

{t = 2*arccos((1/7)*sqrt(14))*_B1-2*_B1*Pi+2*Pi*_Z1-arccos((1/7)*sqrt(14))+Pi}

Is there anyway to get rid of the _B1, or somehow evaluate it by a substitution?

 

Even numerically the answer still retains the _B1.

{t = 1.006853685}, {t = 5.276331623}, {t = -4.269477938*_B1+6.283185308*_Z1+2.134738969}

 

Also it would be nice to remove the _Z1 subscript too, as the domain of the equation is [0, 2pi].

I tried removing the 'AllSolutions' command , but then I am missing two solutions:

solve({7*cos(2*t)=7*cos(t)^2-5., t>=0 and t<=2*Pi}, t, Explicit);

 {t = 1.006853685}, {t = 2.134738969}

There should be 4 solutions in the domain [0, 2pi].

Maple gives me poor accuracy for simple arithmetic problems.

My calculator gives me 0.7 and 0.9 respectively.

I guess I could do evalf(convert(2.59/3.7,fraction)) = 0.7000000000

but this seems excessive.

I am trying to find the orthocenter in the x,y plane, given three coordinates  (x1,y1) (x2,y2) (x3,y3).

I am trying to avoid division by zero.

orthocenter.mw
 

restart:
orthocenter:=proc(x1,y1,x2,y2,x3,y3)
local m1,m2,m3,L1,L2,L3,slope;
slope:=(a,b,c,d)->(d-b)/(c-a);

if x1=x2 then L1:=x=x1;
elif y1=y2 then L1:=y=y1;
else m1:=-1/slope(x2,y2,x3,y3); L1:=y-y1=m1*(x-x1);
end if;

if x2=x3 then L2:=x=x2;
elif y2=y3 then L2:=y=y2;
else m2:=-1/slope(x1,y1,x3,y3);L2:=y-y2=m2*(x-x2);
end if;

if x1=x3 then L3:=x=x1;
elif y1=y3 then L3:=y=y1;
else m3:=-1/slope(x1,y1,x2,y2);L3:= y-y3= m3*(x-x3);
end if;
print(solve({L1,L2,L3},{x,y}));
end proc:

orthocenter(1,1,3,4,5,3);

{x = 11/4, y = 9/2}

(1)

orthocenter(0,0,0,3,4,1)

Error, (in slope) numeric exception: division by zero

 

 


 

Download orthocenter.mw

 

Maple gives me a null output for an equation that has a real solution.

solve(4/x^(1/3)+1=0)

The following command seems to work

solve(4/surd(x,3)+1=0)

-64

Why doesn't this have a solution over the complex numbers, when real numbers are a subset of the complex numbers. Mathematica has the same result too.

 

3 4 5 6 7 8 Page 5 of 8