Kitonum

21530 Reputation

26 Badges

17 years, 84 days

MaplePrimes Activity


These are answers submitted by Kitonum

I assumed that interest is charged at the beginning of each month, as well as at the moment (n-th day of the month) when an additional payment  R  is made. If  n = 1 , then we get the initial result.

 
 

restart;
param:=[P=10000, R=100, i=0.025/12, n=20]:

rsolve({f(t) =( f(t-1)*(1+(n-1)*i/30) + R)*(1+(30-(n-1))/30*i), f(0)=P}, {f});

{f(t) = P*(1+i-(1/900)*i^2*n^2+(8/225)*i^2*n-(31/900)*i^2)^t+30*R*(i*n-31*i-30)*(1+i-(1/900)*i^2*n^2+(8/225)*i^2*n-(31/900)*i^2)^t/(i*(i*n^2-32*i*n+31*i-900))-30*R*(i*n-31*i-30)/(i*(i*n^2-32*i*n+31*i-900))}

(1)

eval(rhs(%[1]),param);

58013.43793*1.002084341^t-48013.43793

(2)

P:=unapply(%,t);

proc (t) options operator, arrow; 58013.43793*1.002084341^t-48013.43793 end proc

(3)

check

seq(P(i),i=0.. 2);

10000.00000, 10120.91979, 10242.09158

(4)

 


 

Download Recurring_new.mw

 

restart;
F(x,y):=ln((1+x)*y) + exp(x^(2)*y^(2)) = x + cos(x):
L:=[1, seq(eval(implicitdiff(F(x,y), y, x$n), [x=0,y=1]), n=1..6)];
add(L[i]/(i-1)!*x^(i-1), i=1..7);

                 

 

 

y:= x-> ((1 + a*x + b*x^2)/(1 + c*x + d*x^2))*(ln(sinh(x)^2 + cosh(x)^2));
Sys:={seq(coeff(series(y(x), x=0, 7), x^n)=0, n=3..6)};
solve(Sys);

                         {a = 0, b = 16/15, c = 0, d = 2/5}

plot([seq([PP[n], QQ[n]], n = 1 .. numelems(PP))], style = pointline, labels = ["PP", "QQ"]);

                   

 

 
Edit.               

In addition to the unknown variables  {C, I, R, S, V} , your nonlinear system contains three more parameters (k , tau, Upsilon). If you want to get all the solutions expressed through these parameters, then use the options parametric=full  and  allsolutions. If you specify the values of these parameters, you can easily get all the solutions:

Sys := {eqn1 = 0, eqn2 = 0, eqn3 = 0, eqn4 = 0, eqn5 = 0};
Equilibria1 := solve(Sys, {C, I, R, S, V}, parametric=full, allsolutions);  # 
All the solutions expressed through 3 parameters
Equilibria2 := solve(eval(Sys, [k = 1, tau = 2, Upsilon = 3]), {C, I, R, S, V});  # All the solutions for specific parameters

If I correctly understood the problem, then the following code solves it. You can yourself specify the number of steps and the reduction factor of the height at each step (parameters  N  and  k):

restart;
L1:=s->[[0,0],[5,0],[2.5,s],[0,0]]:
L2:=s->[[2,0],[7,0],[4.5,s],[2,0]]:
L3:=s->[[4,0],[9,0],[6.5,s],[4,0]]:
A:=s->plot([L1(s),L2(s),L3(s)], color=red, scaling=constrained):
N:=15:  k:=0.8:
for n from 0 to N do
S[n]:=plots:-display([A(4), A(4*k^n)]):
od:
plots:-display(seq(S[n]$5, n=0..N), insequence);

               


 

Did you mean this formula  V=int(S(x), x=a..b) ?  If so, then look at this popular article and my example in Maple below applying this formula.


The problem: find the volume of the body bounded downwards by the plane  z=0 , on the sides by the cylinder  x^2+y^2=R^2 , and the top plane  z=-tan(alpha)*y .


Visualization and calculation (for plotting I took  R=1  and  alpha=Pi/4 ):

A:=plot3d(-y, x=-sqrt(1-y^2)..sqrt(1-y^2), y=-1..0,style=surface, color="LightBlue",  scaling=constrained, axes=normal, filled, transparency=0.3, tickmarks=[[-1=-R,0=0,0.45=x,1=R], 0, 0], axesfont=[times,18]):
B:=plottools:-polygon([[0.45,0,0],[0.45,-sqrt(1-0.45^2),0],[0.45,-sqrt(1-0.45^2),sqrt(1-0.45^2)]], color=blue):
plots:-display(A,B); 
# Visualization

S(x):=1/2*sqrt(R^2-x^2)*sqrt(R^2-x^2)*tan(alpha):
V=int(S(x), x=-R..R); 
# Calculation

                    

 

 

 


 

It often happens that a symbolic result is not expressed in terms of real radicals (for example, the irreducible case when solving a cubic equation, when all the roots of the equation are actually real). An example below with the specified parameters  under of numerical calculation shows that the result is actually real:

fs := (1-1/sqrt((Uo+U*sin(x))^2+a^2))*(Uo+U*sin(x)): 
fss := `assuming`([2*(int(fs*sin(x), x = 0 .. Pi))/Pi], [U::positive, a::positive, Uo::positive]):
evalf[50](eval(fss, [Uo=1, U=2, a=3]));

                2.4545008734200178385686140997145766421739797191553-                    5.5000000000000000000000000000000000000000000000000*10^(-50)*I

The symbolic result:

with(geometry):
eq := evalf[20](expand(subs([x, y] =~ convert(Student:-LinearAlgebra:-RotationMatrix(Pi/3).<x, y>, list), 2*(x-1)^2+sqrt(2)*y^2-1))):
conic(c, eq, [x, y]):
coordinates(center(c));
identify(evalf[15](%));

                                              [1/2, -1/2*3^(1/2)]

You forgot to put commas between individual equations in your system. I fixed it. It turned out that the system is inconsistent, because  solve  command returns  NULL . The determinant of the system is 0.

Sys := {-6.7642088272251297212*d[1, 1]-.23520507704562101132*d[1, 2]-5.8233885190426456759*d[1, 3]+34.632657184619275137*d[1, 4]+1.8308401918550417305*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.5761922829080091932*d[2, 3]-9.373876878125528749*d[2, 4]-14.087569594645296643*d[3, 1]-.48985298599265354856*d[3, 2]-12.128157650674682449*d[3, 3]+72.128164697121390121*d[3, 4]+77.022155175221117487*d[4, 1]-17.156128463674125233*d[4, 2]+145.64666902991761843*d[4, 3]-601.11088029977885095*d[4, 4] = 0, -6.3505370802317673052*d[1, 1]-.23520507704562101132*d[1, 2]-5.4097167720492832599*d[1, 3]+54.802782951629695640*d[1, 4]+1.7188733853924696263*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.4642254764454370890*d[2, 3]-14.833240696164645293*d[2, 4]-13.226030621801645811*d[3, 1]-.48985298599265354856*d[3, 2]-11.266618677831031617*d[3, 3]+114.13574573628827681*d[3, 4]+107.19584752215150208*d[4, 1]-17.156128463674125233*d[4, 2]+175.82036137684800302*d[4, 3]-1136.3239123361047712*d[4, 4] = 0, -5.7167551941125971285*d[1, 1]-.23520507704562101132*d[1, 2]-4.7759348859301130832*d[1, 3]+82.882747548740738074*d[1, 4]+1.5473302855836067493*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.2926823766365742120*d[2, 3]-22.433527600870893213*d[2, 4]-11.906076336447024126*d[3, 1]-.48985298599265354856*d[3, 2]-9.9466643924764099316*d[3, 3]+172.61685795222431091*d[3, 4]+153.42462622364681378*d[4, 1]-17.156128463674125233*d[4, 2]+222.04914007834331471*d[4, 3]-2162.1913920527683546*d[4, 4] = 0, -2.3520507704562101132*d[1, 1]+.6366197723675813431*d[1, 2]-4.898529859926535486*d[1, 3]+32.157042520884777450*d[1, 4]-2.3520507704562101132*d[2, 1]+.63661977236758134308*d[2, 2]-4.8985298599265354856*d[2, 3]+32.157042520884777447*d[2, 4]+7.0561523113686303394*d[3, 1]-1.9098593171027440293*d[3, 2]+14.695589579779606457*d[3, 3]-96.47112756265433234*d[3, 4]-11.760253852281050559*d[4, 1]+3.183098861837906715*d[4, 2]-24.49264929963267742*d[4, 3]+160.7852126044238874*d[4, 4] = 1, -1.8308401918550417299*d[1, 1]-0.6366197723675813430e-1*d[1, 2]-1.5761922829080091926*d[1, 3]+9.373876878125528754*d[1, 4]+1.8308401918550417305*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.5761922829080091932*d[2, 3]-9.373876878125528749*d[2, 4]-9.1542009592752086523*d[3, 1]-.31830988618379067154*d[3, 2]-7.8809614145400459657*d[3, 3]+46.869384390627643742*d[3, 4]+19.328418292985322519*d[4, 1]-19.162255148264198426*d[4, 2]+95.977438886042116228*d[4, 3]-305.71973224709969080*d[4, 4] = 0, -1.7188733853924696257*d[1, 1]-0.6366197723675813430e-1*d[1, 2]-1.4642254764454370885*d[1, 3]+14.833240696164645297*d[1, 4]+1.7188733853924696263*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.4642254764454370890*d[2, 3]-14.833240696164645293*d[2, 4]-8.5943669269623481316*d[3, 1]-.31830988618379067154*d[3, 2]-7.3211273822271854450*d[3, 3]+74.166203480823226458*d[3, 4]+53.030427038219525869*d[4, 1]-19.162255148264198426*d[4, 2]+129.67944763127631958*d[4, 3]-668.89639482661771723*d[4, 4] = 0, -1.5473302855836067487*d[1, 1]-0.6366197723675813430e-1*d[1, 2]-1.2926823766365742115*d[1, 3]+22.433527600870893218*d[1, 4]+1.5473302855836067493*d[2, 1]+0.63661977236758134308e-1*d[2, 2]+1.2926823766365742120*d[2, 3]-22.433527600870893213*d[2, 4]-7.7366514279180337465*d[3, 1]-.31830988618379067154*d[3, 2]-6.4634118831828710599*d[3, 3]+112.16763800435446606*d[3, 4]+104.66490008068725185*d[4, 1]-19.162255148264198426*d[4, 2]+181.31392067374404557*d[4, 3]-1455.2623850848598494*d[4, 4] = 0, -1.4491448767744190950*d[1, 1]-1.9098593171027440292*d[1, 2]+6.1902923916365570215*d[1, 3]-11.964006709004497915*d[1, 4]+.4830482922581396984*d[2, 1]+.63661977236758134308*d[2, 2]-2.0634307972121856740*d[2, 3]+3.988002236334832639*d[2, 4]-3.381338045806977889*d[3, 1]-4.4563384065730694016*d[3, 2]+14.444015580485299718*d[3, 3]-27.91601565434382847*d[3, 4]+19.804979982583727629*d[4, 1]+26.101410667070835066*d[4, 2]-84.600662685699612634*d[4, 3]+163.5080916897281382*d[4, 4] = 0, -1.4491448767744190950*d[1, 1]+.4830482922581396984*d[1, 2]-3.381338045806977889*d[1, 3]+19.804979982583727629*d[1, 4]-1.9098593171027440292*d[2, 1]+.63661977236758134308*d[2, 2]-4.4563384065730694016*d[2, 3]+26.101410667070835066*d[2, 4]+6.1902923916365570215*d[3, 1]-2.0634307972121856740*d[3, 2]+14.444015580485299718*d[3, 3]-84.600662685699612634*d[3, 4]-11.964006709004497917*d[4, 1]+3.988002236334832638*d[4, 2]-27.91601565434382847*d[4, 3]+163.50809168972813819*d[4, 4] = 0, -.6366197723675813431*d[1, 1]+.6366197723675813431*d[1, 2]-3.1830988618379067164*d[1, 3]+12.095775674984045516*d[1, 4]-.6366197723675813430*d[2, 1]+.63661977236758134308*d[2, 2]-3.1830988618379067154*d[2, 3]+12.095775674984045518*d[2, 4]+1.9098593171027440288*d[3, 1]-1.9098593171027440293*d[3, 2]+9.549296585513720146*d[3, 3]-36.287327024952136560*d[3, 4]-3.183098861837906717*d[4, 1]+3.183098861837906715*d[4, 2]-15.91549430918953358*d[4, 3]+60.47887837492022764*d[4, 4] = 1, .4830482922581396984*d[1, 1]+.6366197723675813431*d[1, 2]-2.0634307972121856744*d[1, 3]+3.988002236334832645*d[1, 4]+.4830482922581396984*d[2, 1]+.63661977236758134308*d[2, 2]-2.0634307972121856740*d[2, 3]+3.988002236334832639*d[2, 4]-1.4491448767744190956*d[3, 1]-1.9098593171027440293*d[3, 2]+6.1902923916365570221*d[3, 3]-11.96400670900449791*d[3, 4]+2.415241461290698491*d[4, 1]+3.183098861837906715*d[4, 2]-10.317153986060928369*d[4, 3]+19.94001118167416332*d[4, 4] = 1, 1.9098593171027440291*d[1, 1]-1.9098593171027440292*d[1, 2]+9.5492965855137201456*d[1, 3]-36.287327024952136554*d[1, 4]-.6366197723675813430*d[2, 1]+.63661977236758134308*d[2, 2]-3.1830988618379067154*d[2, 3]+12.095775674984045518*d[2, 4]+4.4563384065730694010*d[3, 1]-4.4563384065730694016*d[3, 2]+22.281692032865347008*d[3, 3]-84.67042972488831863*d[3, 4]-26.101410667070835067*d[4, 1]+26.101410667070835066*d[4, 2]-130.50705333535417533*d[4, 3]+495.92680267434586630*d[4, 4] = 0, 1.9098593171027440291*d[1, 1]-.6366197723675813430*d[1, 2]+4.4563384065730694010*d[1, 3]-26.101410667070835067*d[1, 4]-1.9098593171027440292*d[2, 1]+.63661977236758134308*d[2, 2]-4.4563384065730694016*d[2, 3]+26.101410667070835066*d[2, 4]+9.5492965855137201456*d[3, 1]-3.1830988618379067154*d[3, 2]+22.281692032865347008*d[3, 3]-130.50705333535417533*d[3, 4]-36.287327024952136554*d[4, 1]+12.095775674984045518*d[4, 2]-84.670429724888318626*d[4, 3]+495.92680267434586626*d[4, 4] = 0, 7.0561523113686303394*d[1, 1]-2.3520507704562101132*d[1, 2]+16.464355393193470792*d[1, 3]-96.434081588704614639*d[1, 4]-1.9098593171027440292*d[2, 1]+.63661977236758134308*d[2, 2]-4.4563384065730694016*d[2, 3]+26.101410667070835066*d[2, 4]+14.695589579779606456*d[3, 1]-4.8985298599265354856*d[3, 2]+34.289709019485748399*d[3, 3]-200.83972425698795490*d[3, 4]-96.471127562654332340*d[4, 1]+32.157042520884777447*d[4, 2]-225.09929764619344213*d[4, 3]+1318.4387433562758753*d[4, 4] = 0, 7.0561523113686303394*d[1, 1]-1.9098593171027440292*d[1, 2]+14.695589579779606456*d[1, 3]-96.471127562654332340*d[1, 4]-2.3520507704562101132*d[2, 1]+.63661977236758134308*d[2, 2]-4.8985298599265354856*d[2, 3]+32.157042520884777447*d[2, 4]+16.464355393193470792*d[3, 1]-4.4563384065730694016*d[3, 2]+34.289709019485748399*d[3, 3]-225.09929764619344213*d[3, 4]-96.434081588704614639*d[4, 1]+26.101410667070835066*d[4, 2]-200.83972425698795490*d[4, 3]+1318.4387433562758754*d[4, 4] = 0, 11.581726419330485018*d[1, 1]-3.8605754731101616728*d[1, 2]+27.024028311771131709*d[1, 3]-158.28359439751662858*d[1, 4]-1.9098593171027440292*d[2, 1]+.63661977236758134308*d[2, 2]-4.4563384065730694016*d[2, 3]+26.101410667070835066*d[2, 4]+19.221163687741461135*d[3, 1]-6.4070545625804870452*d[3, 2]+44.849381938063409316*d[3, 3]-262.68923706579996884*d[3, 4]-172.31418534244454203*d[4, 1]+57.438061780814847345*d[4, 2]-402.06643246570393142*d[4, 3]+2354.9605330134087411*d[4, 4] = 0}:
Digits:=50:
solve(convert(Sys, fraction)); 
# Returns NULL
with(LinearAlgebra):
var:=convert(indets(Sys), list):
A, b:=GenerateMatrix(Sys, var):
Determinant(convert(A, fraction));
                                                                 
 0
 

@John Fredsted  Thanks for this elegant and simple solution (thumb up)!

I propose an improvement. Now it can also split polynomials and radicals.

Splitting:=proc(Expr)
local x, y, Expr1, Expr2;
x, y:=indets(Expr, name)[];
Expr1, Expr2 := selectremove(z -> has(z,x) and has(z,y), simplify(factor(Expr), symbolic));
``(simplify(select(has, Expr2*expand(Expr1), x)))*
``(simplify(remove(has, Expr2*expand(Expr1), x)));
end proc:


Example of use:

Expr:=(x^2*y+y)*y^3*exp(-x-y+1)*3^(-x-y)*sqrt(x^2*y-y);
Splitting(Expr);

                    

 

 

 

@AndreaAlp  You wrote  "I'm talking about the original surfaces f(x,y) =z and g(x,z)=y. If I understood correctly, f is a plane and g is a parabolid. But I cannot find the correct centre of the intersecting ellipse."
In fact, these two surfaces do not intersect. Below we show it strictly analytically (although it is easy to see also from the plotting). First, we eliminate z-variable from the system, and then reduce the resulting equation to completed square form:

restart;
with(Student:-Precalculus):
my_plane := z=2024.30587449691-.341275505799078*x-3.89936179341114*y:
my_quadric := y=-10595.4104931095+6.73749956241827*x+42.1022818380012*z-0.654818649508000e-1*x^2-0.421174257681115e-1*z^2:
Sys:=[my_plane, my_quadric];
A:=eliminate(Sys,z);
B:=CompleteSquare(%[2][], x);
C:=op(1,B)+CompleteSquare(`+`(op(2..-1,B)), y)=0;  
# The equation C has not any real solutions
plots:-implicitplot3d([my_plane, my_quadric], x=0..150, y=-100..450,z=400..600, style=surface, color=["LightBlue", yellow], numpoints=10000, scaling=constrained, axes=normal); # The visial check
                                

Let us dwell on the version with surfaces  z=f(x,y) and g(x,z)=0 . Of course, the first surface is a plane, and the second surface is an elliptical cylinder. To save all proportions, scaling=constrained  option is used:

restart:      
with(plots):    
with(Student:-Precalculus):
my_plane := z=2024.30587449691-.341275505799078*x-3.89936179341114*y:
my_quadric := -10595.4104931095+6.73749956241827*x+42.1022818380012*z-0.654818649508000e-1*x^2-0.421174257681115e-1*z^2:
Expr:=CompleteSquare(my_quadric, [x,z]);
x0:=solve(op(2,Expr))[1]; z0:=solve(op(1,Expr))[1]; 
# [x0,z0] are the coordinates the intersection of the axis of the cylinder with (x,z)-plane
A:=spacecurve([x0,t,z0], t=300..500, color=violet, thickness=3, linestyle=2):
B:=intersectplot(subs(y=y-1,my_plane), my_quadric, x=0..100, y=300..500,z=420..580, color=red, thickness=4): 
P:=plots:-implicitplot3d([my_plane, my_quadric], x=0..100, y=0..430,z=420..580, style=surface, color=["LightBlue", yellow], numpoints=10000, scaling=constrained, axes=normal, lightmodel=light4):
display(A,B,P);

 

 

Here is another solution, also based on reduction to the solution of a differential equation, but without any substitutions. The values of all the parameters for the numerical solution I took arbitrarily:

Download System.mw


Here is the corrected solution. I did not delete the previous version, because it is more simple and the idea of a solution is clearer on it:

System_new.mw


Edit.

You have a system of 5 linear ordinary differential equations with 14 parameters. Maple can not solve it symbolically, but it easily solves numerically. For this, we must specify the values of all parameters and the initial conditions. Here is an example of a solution with visualization: 
 

Download System.mw

restart;
RealDomain:-solve({x=r*cos(theta), y=r*sin(theta)}, {r,theta}, explicit);

   

Formally, both solutions are correct. But if you want  r>=0 , then leave only the first solution. Your expected result is incorrect, because  arctan(y/x)  returns the angle in the range  -Pi/2 .. Pi/2  only. See help on arctan  function about  two-argument function arctan(y, x)

First 136 137 138 139 140 141 142 Last Page 138 of 290