2.5

2.5 | 2 ratings Rate this file 9 Downloads (last 30 days) File Size: 69.47 KB File ID: #15514

Non-homogeneous and linear-differential-equation solutions (update:13-07-07)

by Ali OZGUL

 

06 Jul 2007 (Updated 13 Jul 2007)

homogen and non-homogen solution

| Watch this File

File Information
Description

DESCRIPTION;

 This program is a running module for homsolution.m Matlab-functions. Also, differential non-homogeneous or homogeneous equations are solution possible the Matlab&Mapple Dsolve.m&desolve main-functions. But;

 EXAMPLE;
 [1]--+---Sometime mapple function is produce more short solution
          |--- My function's solution:

      [ R^4-4*R^3 ]*(y) = [5 ]
      y = [ +exp^(4x).(C4)+exp^(0x).(C1+C2*x^1+C3*x^2) ]g + [-5/24*x^3-5/32*x^2-5/64*x-5/256 ]s
                 Generally solution Special solution
                 #### true ##### #### true #####
          |
          |--- Mapple's desolve function solution:

      Dsolve('D4y-4*D3y-5=0','x')
      ans =1/64*exp(4*x)*C1-5/24*x^3+1/2*C2*x^2+C3*x+C4
      y= 1/64*exp(4*x)*C1 + 1/2*C2*x^2 + C3*x + C4 - 5/24*x^3
          Generally solution Special solution (more short)
                 #### true ##### #### true #####

 [2]---+---Matlab's Dsolve.m function is depend be selected input-veriables string character
           |
           |--- My function's solution:
      

>> homsolution([(R^4-16)^5*(R^2+1)*(R/(R^2+R+1))^2, x^20+x^10+sin(x)],0)
where R=[d/dx] and [f(R)].y = Q(x,y) differential equation solution
    
____Equation [1]

[ (R^4-16)^5*(R^2+1)*R^2/(R^2+R+1)^2 ]*(y) = [x^20+x^10+sin(x) ]
y= [ +exp^(-2x).(C20+C21*x^1+C22*x^2+C23*x^3+C24*x^4)+exp^(2ix)+ ...]g+ [ ...1/1518750*x*cos(x)^6+ ...]s

          |
          |--- Mapple's desolve function solution:

       Dsolve('((Dy)^4-16)^5*((Dy)^2+1)*(Dy)^2/((Dy)^2+Dy+1)^2-(x^20+x^10+sin(x))=0','x')
      (I don't advise , don't try this module, non-solution )

 [3]---+---Sub-function running speed (for running 29-examples)
        if you hide homsolution.m-lines(68,69,155,156) as fprintf,disp etc.. command then
       
        My function is 1.602342 second (tic-toc & profiler control)
        Matlab function is 1.094779 second

 ALGORITHM;

--+--if Q(x,y)<> 0 than special solution
     root value root-order degree
        r1=R1 n1
        r2=R2 n2
        ..... ....
        rn=Rn nn
        |---+---if root value = real
                |
                |----+---[max real root order degree]
               else
                |
           Solution=1/[R-small root(1)]...
                    1/[R-small root(2)]...
                    1/[R-small root(n)]*[Q(x,y] (**)
            where all step is first-order degree linear diff. equ. sol.
        |---+---if root value = complex
                |
                |----+---[max complex root order degree]
               else
                |
           Solution=1/[R-small root(1)]...
                    1/[R-small root(2)]...
                    1/[R-small root(n)]*[Q(x,y] (**)
            where all step is first-order degree linear diff. equ. sol.

 SYNTAX:

     syntax.input : solution=regsolution.ouput (differential main function solution)
     syntax.output: regsolt =conforming roots values for special solutions

 EXAMPLE:
          [ (R-2)^2*(R^2+1)^2*(R-1)^2 ]*(y) = [x^8 ]

 Solution=
          1.0000 2.0000
          2.0000 2.0000
          0 + 1.0000i 2.0000
          0 - 1.0000i 2.0000

regsolt =

         1.0000 firstly real roots
         1.0000
         2.0000
         2.0000 --->look ALGORITHM<---
         0 - 1.0000i
         0 - 1.0000i
         0 + 1.0000i secondly imaginer roots
         0 + 1.0000i

 Solution=[1/(R-1)][1/(R-1)][1/(R-2)][1/(R-2)][1/(R+sqrt(-1))] [1/(R+sqrt(-1))][1/(R-sqrt(-1))][1/(R-sqrt(-1))][ Q(x,y) ]

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Jean Le Rand D'Alambert Reduction Method (update:22-06-07), First-Order Degree Linear Differential Equations (Integration factor Ig=x^a*y^b) (Update: 23-06-07), Homogen Differential Equations Solving (update:27-06-07)

MATLAB release MATLAB 6.5.1 (R13SP1)
Other requirements Matlab symbolic applications
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
06 Jul 2007 Ali Özgül

[1] In homsolution.m sub-function is appearing error: FOR may not be aligned with its matching END. But, this errors not appear my m-lint test and intersting this program running this m-lint error.

[2] Example.m main-file appear Help-warning error, But this file in possible, description, example and syntax-line

Why this errors appear? Can you send me submission this reason, I will be happy.

25 Oct 2007 riendy setiadi

i think it is awful, sorry but i just give a critic. i think it should be tidy n not make a guest confuse.thx

07 Jul 2008 Mohammad Rahman

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

hi all,
the following code that i have written is giving error while i run it. can anyone help me to find out the bug?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

TT = 50*10^-9;
a = 0.2;

I0 = 6* 10^13;
z1 = 1.5*10^7;
z2 = 1.65* 10^6;
z = 2/(1/z1 + 1/z2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for i=1:1:150
    t(i)= -1e-9+i/1e-9;
    if (t(i) <= TT/2)
    Ip(i) = I0*t(i)*2/TT ;
else
    Ip(i)= I0 - 2* I0*(t(i) - TT/2)/TT;
    end
    sol(i) = Dsolve ('Dl = 2*p/z, D2l = (Ip(i)-(z/2+3/(4*a))*(Dl)^2)/(3*z/(4*a))', 'l(0) = 1e-10, p(0) = 1e5', 't(i)')
% Sol(i) = dsolve ('DL(t(i)) = 2*P(t(i))/z', 'DP(t(i))= (Ip-(3*P(t(i))/(2*a)+1)*(L(t(i))))/L(t(i))', 'L(0) = 1.*^-10', 'P(0) = 1.*^5', 't(i)');
%Solution = DSolve [{L'[t] ==2*P[t]/z, P'[t]==(Ip-(3*P[t]/(2*a)+1)*(L' [t]))/L[t], L[0] == 1.*^-10, P[0] == 1.*^5}, {P[t], L[t]}, {t, 0,3*TT}];
%Solution = NDSolve[L'[t] == 2*P[t]/z, L[t], {t, 0, 3*TT}];

end

Please login to add a comment or rating.
Updates
13 Jul 2007

Updated regsolution.m file

Tag Activity for this File
Tag Applied By Date/Time
differential equations Ali OZGUL 22 Oct 2008 09:18:37
linear differential equation Ali OZGUL 22 Oct 2008 09:18:37
homogeneous Ali OZGUL 22 Oct 2008 09:18:37
special solution Ali OZGUL 22 Oct 2008 09:18:37
math Ali OZGUL 22 Oct 2008 09:18:37

Contact us at files@mathworks.com