Kitonum

21450 Reputation

26 Badges

17 years, 47 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart;

N:={F=1, K=1.2}:

Eq:= diff(C(x),x$2)-F*diff(C(x),x)-F*K*C(x)=0:

Bcs:=  F*D(C)(0)=C(0)-1, D(C)(1)=0:

Sol:= dsolve(eval({Eq, Bcs}, N), C(x));

assign(%);

plot(C(x), x=0..3, 0..3, color=red, thickness=2);

 

 

f:=x->1/4*x^3-x^2-x+4;

op(map(t->[t,f(t)], {solve(f(x))}));

                  

 

 

Rewrite your equation as follows

cos(x)=(sin(x)*sin(x/1000))/x

It is easy to show that  abs((sin(x)*sin(x/1000))/x)<=1/1000  and therefore the roots of your equation (except x=0) are very close to the roots of the equation  cos(x)=0 . You can easily find any number of roots of your equation, taking as the intervals ends (for each root of your equation) the successive roots of  the equation sin(x)=0

 

For example, here are the first 10 positive roots:

seq(fsolve(x*cos(x)-sin(x)*sin(x/1000), x=Pi*k .. Pi*(k+1)), k=0 .. 9);

seq(fsolve(cos(x), x=Pi*k .. Pi*(k+1)), k=0 .. 9);  # For comparison


1.569796328, 4.711388984, 7.852981645, 10.99457431, 14.13616697, 17.27775964, 20.41935232, 23.56094499, 26.70253767, 29.84413036

1.570796327, 4.712388980, 7.853981634, 10.99557429, 14.13716694, 17.27875959, 20.42035225, 23.56194490, 26.70353756, 29.84513021

 

a := 2: b := -3:

solve(subs({x^2 = t, y^2 = z}, a*x^2+b*y^2 = 0), z);

plot(%, t = 0 .. 3, color = red, thickness = 2, scaling = constrained, labels = [x^2, y^2]);

                           

 

Edited. For real  a ,  b , x , y  if  a>0  and  b>0  or  a<0  and  b<0  the equality  a*x^2+b*y^2 = 0  is impossible.

An example:

f:=0.5:

plots[spacecurve]([cos(2*Pi*f*t), sin(2*Pi*f*t), t], t=0..6, color=red, thickness=2, axes=normal, numpoints=1000, labels=[``,``, t]);

                                          

 

 

Edited.

 

 

plot3d( [u,u,v], u=0..1, v=0..1, color=blue, orientation=[10,60], axes=normal); # by parametric equations

plots[implicitplot3d](x-y=0, x=0..1, y=0..1, z=0..1,  color=blue, orientation=[10,60], axes=normal); # by implicit equation

Just use the formulas for the coefficients for the even expansion from the range [0,l]:

a_0=2/l*int(f(x), x=0..l),   a_n=2/l*int(f(x)*cos(n*Pi*x/l), x)

 

The code:

restart;

f:=x->2*x-2: l:=1:

a0:=2/l*int(f(x), x=0..l); a:=unapply(2/l*int(f(x)*cos(n*Pi*x/l), x=0..l), n);

a0/2+Sum(a(n)*cos(n*Pi*x/l), n=1..infinity);    # Fourier series for even expansion of f(x)=2*x-2

a0/2+add(a(n)*cos(n*Pi*x/l), n=1..6);

plot([2*abs(x)-2, %], x=-1..1, color=[red,blue]);

              

 

 

 

 

In Maple  e^x  should be coded as  exp(x). Maple can not calculate your integral in closed form symbolically but Maple can calculate it numerically, for example

evalf(Int(exp(-s)*ln(1+s*exp(-s)), s=0..10));

                            0.2192571175

plot(Int(exp(-s)*ln(1+s*exp(-s)), s=0..t), t=0..5);

                                     

 

 

To find a solution I have arbitrarily given initial conditions:

restart;

w:=1+t/100:

dsolve({diff(x(t),t$2)+w^2*x(t)=0, x(0)=1, D(x)(0)=2}, x(t)):

x:=unapply(rhs(%), t):

y:=unapply(diff(x(t),t), t):

plot([x,y], 0..10, color=[red,blue], thickness=2, legend=['x(t)','y(t)']);

                           

 

 

If I understand your question then

A:= .5464691235-.4473247264*I, -.4563184747+1.*10^(-14)*I, .5464691235+.4473247264*I:

 Re(sort([A], (z1,z2)->abs(Im(z1))<abs(Im(z2)))[1]);

                                                    -0.4563184747

Secant := proc (f::procedure, x1::realcons, x2::realcons)

local A, B, C, a, b, d;

a, b := `if`(is(x1<x2), op([x1,x2]), op([x2,x1]));

d := b-a;

A := plot(f, a-(1/5)*d .. b+(1/5)*d, color = blue, thickness = 2);

B := plot(f(a)+(f(b)-f(a))*(x-a)/(b-a), x = a-(1/5)*d .. b+(1/5)*d, color = green, thickness = 2);

C := plot([[a, f(a)], [b, f(b)]], style = point, symbol = solidcircle, symbolsize = 17, color = red);

print(y = f(a)+(f(b)-f(a))*(x-a)/(b-a));

plots:-display(A, B, C, gridlines);

end proc:

 

Example:

Secant(x->x^2, -1, 2);

                        

 

 

restart;

A:=plot(x^2, x=-2.5..2.5, color=blue, thickness=2):

B:=plot([[1,1],[2,4]], style=point, symbol=solidcircle, color=red, symbolsize=17):

plots[display](A,B, scaling=constrained, gridlines);

                        

 

Edited.

 

 

This particular problem can be solved in Maple by simple enumeration  on the set of all partitions of the original set of 8 golfers:

S:=combinat[setpartition]({$ 1..8}, 2):

S1:={S[1]}: n:=nops(S):

print(S[1]);

for i from 2 to n do

S2:=op(S1);

if `intersect`(S[i], `union`(S2))={} then

S1:={S2,S[i]}; print(S[i]) fi;

od:

                    

 

 

Edited.

Example:

A:=Matrix(10, (i,j)->evalf(sin(i*j)^2)):

plots[matrixplot](A, axes=boxed);

                       

In fact, you have a system of algebraic equations rather than of differential equations (no derivatives). Therefore, decide it by solve  command in real domain:

RealDomain[solve]({a^2*b=-7, a=3*b}, {a,b});

                   

 

 

First 202 203 204 205 206 207 208 Last Page 204 of 289